When my app starts up, I get 1 or more 4.00KB memory leaks with the frame being _stack_chk_fail and the library libSystem.B.dylib. Any suggestions on what this could be would be appreciated. Thank you.
+2
A:
This website - http://blog.freimann.org/archives/16-__stack_chk_fail-when-compiling-filo.html
suggests you add
-fno-stack-protector
to your compile options.
jmont
2010-07-13 17:45:43
Thanks, but it does not seem that the link you reference is related to Cocoa/Objective-C
Run Loop
2010-07-13 17:51:44
gcc is the compiler that objc uses to compile (just like C), and this is a flag that gcc accepts. Under Xcode > Project > Edit Project Settings > Build you should be able to find a field to add this flag for gcc.
jmont
2010-07-13 18:14:02
Fair enough, but fo you have any idea what this flag means? I would not like to add something to the compile options without understanding why or what it does
Run Loop
2010-07-13 18:20:48
according to http://www.trl.ibm.com/projects/security/ssp/this flag disables the stack-smashing protector, which protects your program against a stack smashing attack. since i wasn't familiar with that term I looked it up:from http://searchsecurity.techtarget.com/sDefinition/0,,sid14_gci913633,00.html"Stack smashing is causing a stack in a computer application or operating system to overflow." Which is very fitting for this website....
jmont
2010-07-13 22:22:06
Anyway, I don't think your computer will explode if you turn this flag on, I'd give it a try (maybe just like a temporary fix?) and if it doesn't work, then I would check if your gcc needs updating/patches.
jmont
2010-07-13 22:22:45
Thank you very much.
Run Loop
2010-07-14 05:45:01