How to enable Stack Smashing Protection in pure swift application?
I did try to put \"-fstack-protector-all\" flag to Other C++ Flags under project build settings t
In Swift, Stack smashing is enabled by default one only need to add the "-fstack-protector-all" flag under build settings in objective-c applications.
How to check if stack smashing is enabled.
Run the otool command and presence of stack_chk_guard
and stack_chk_fail
means the code is stack smashing protected.
$ otool -Iv |grep stack
0x0013dfg 520 ___stack_chk_fail
0x001d009 521 ___stack_chk_guard
0x001fd345 520 ___stack_chk_fail
0x000000010087efd 513 ___stack_chk_fail
0x0000000100098hf3 514 ___stack_chk_guard
0x00000001000897gfr 513 ___stack_chk_fail