• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: __stack_chk_fail?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __stack_chk_fail?


  • Subject: Re: __stack_chk_fail?
  • From: sebi <email@hidden>
  • Date: Mon, 14 Feb 2011 17:02:50 +0100

hehe, agreed :-)
unfortunately this is some old 3rd party code and I'm not in the mood to look for stack corrupting code there. I hoped there was some simple solution but now I think it might be better to use some more recent id3 library instead.

thanks and regards,
sebastian mecklenburg

On 14.02.2011, at 16:47, Jean-Daniel Dupas wrote:

>
> Le 14 févr. 2011 à 16:34, claw a écrit :
>
>> 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
>>
>
>
> http://www.codinghorror.com/blog/2008/03/the-first-rule-of-programming-its-always-your-fault.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
>>>
>>>
>>>
>>>
>>
>
> -- 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

References: 
 >__stack_chk_fail? (From: sebi <email@hidden>)
 >Re: __stack_chk_fail? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: __stack_chk_fail? (From: claw <email@hidden>)
 >Re: __stack_chk_fail? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: __stack_chk_fail? (From: claw <email@hidden>)
 >Re: __stack_chk_fail? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: __stack_chk_fail?
  • Next by Date: Re: [NSFileHandle isOpen]?
  • Previous by thread: Re: __stack_chk_fail?
  • Next by thread: Organizing build for MacAppStore/Site application versions
  • Index(es):
    • Date
    • Thread