Re: __stack_chk_fail?
Re: __stack_chk_fail?
- Subject: Re: __stack_chk_fail?
- From: claw <email@hidden>
- Date: Mon, 14 Feb 2011 16:34:30 +0100
so perhaps the check configuration contains wrong value, i found the following URL about how the stack checking is done
http://www.delorie.com/gnu/docs/gcc/gccint_124.html
Le 14 févr. 2011 à 16:19, Jean-Daniel Dupas a écrit :
> It does not prevent buffer overflow, it generate check in each function to abort when one is detected.
> This is exactly what append here, __stack_chk_fail is the call inserted by GCC to check the stack and abort if it is corrupted.
>
>
> Le 14 févr. 2011 à 16:15, claw a écrit :
>
>> 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
>>
>
> -- 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