Re: __stack_chk_fail?
Re: __stack_chk_fail?
- Subject: Re: __stack_chk_fail?
- From: claw <email@hidden>
- Date: Mon, 14 Feb 2011 16:15:57 +0100
GCC has an option to prevent "buffer overflow protection" you can use it with compiler option :
-fstack-protector / -fno-stack-protector
Le 14 févr. 2011 à 16:05, Jean-Daniel Dupas a écrit :
> Le 14 févr. 2011 à 16:00, sebi a écrit :
>
>> Hello,
>>
>> I'm writing an mp3 file renamer that uses the id3lib. Somewhere in the id3lib code my app crashes with SIGABRT when trying to return from a function* showing "__stack_chk_fail" in the debugger's stack trace pane. This happens when I use GCC 4.2 as compiler. When I use LLVM GCC 4.2 my application runs just fine. Neither clang nor GuardMalloc show any problems at compile- or runtime.
>> I'm using Xcode 3.2.5 on Mac OS 10.6.6.
>> Does someone have an idea what could be the problem here?
>>
>> Thanks and regards,
>> Sebastian Mecklenburg
>
> This is a stack corruption error. You're probably writing past the end of a stack buffer and corrupt your stack.
> I'm not sure llvm-gcc 4.2 properly supports this feature (that would explain why it run fine when using llvm-gcc), or it may simply order variables on the stack in a way that prevent the overflow detection.
> Anyway, you should check your function to find why the stack is corrupted when it returns.
>
>
> -- Jean-Daniel
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden