File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -150,9 +150,9 @@ impl fmt::Display for CheckSecResults {
150150/// }
151151/// ```
152152pub trait Properties {
153- /// check import names for `_objc_release`
153+ /// check symbol names for `_objc_release` or `_swift_release `
154154 fn has_arc ( & self ) -> bool ;
155- /// check import names for `___stack_chk_fail` or `___stack_chk_guard `
155+ /// check symbol names for `___stack_chk_fail` `___stack_chk_guard` or `___chkstk_darwin `
156156 fn has_canary ( & self ) -> bool ;
157157 /// check data size of code signature in load commands
158158 fn has_code_signature ( & self ) -> bool ;
@@ -178,8 +178,9 @@ impl Properties for MachO<'_> {
178178 fn has_arc ( & self ) -> bool {
179179 for i in self . symbols ( ) {
180180 if let Ok ( ( symbol, _) ) = i {
181- if symbol == "_objc_release" {
182- return true ;
181+ match symbol {
182+ "_objc_release" | "_swift_release" => return true ,
183+ _ => continue ,
183184 }
184185 }
185186 }
@@ -189,7 +190,7 @@ impl Properties for MachO<'_> {
189190 for i in self . symbols ( ) {
190191 if let Ok ( ( symbol, _) ) = i {
191192 match symbol {
192- "___stack_chk_fail" | "___stack_chk_guard" => return true ,
193+ "___stack_chk_fail" | "___stack_chk_guard" | "___chkstk_darwin" => return true ,
193194 _ => continue ,
194195 }
195196 }
You can’t perform that action at this time.
0 commit comments