This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to debug "*** glibc detected *** double free or corruption" bugs?


On 24 Nov 2008, Carlos O'Donell said:

> On Sun, Nov 23, 2008 at 6:35 PM, Nix <nix@esperi.org.uk> wrote:
>>> The issue is when your target as no backtrace() function. Mine is a DaVinci ARM from TI. On this platform (with a libc version
>>> 2.3.3), there is no backtrace infos after the message "*** glibc detected ***".
>>>
>>> And, as the core file does not say anything about the bt, how can I debug the memory corruption?
>
> On ARM you must compile all of your application and shared libraries
> with unwind tables for the debugger to be able to unwind the stack
> e.g. -funwind-tables -fasynchronous-unwind-tables.
>
> The backtrace() function has not yet been implemented for ARM under
> the new EABI.

Using DWARF2 unwinding is likely preferable anyway, isn't it?

>> (Might it not be a good idea to compile abort() with debugging
>> information at all times, even when compiling the normal shared libcs?)
>
> This is not a decision for the project to make. Distributions should
> make this decision, they understand their users requirements better,
> and can customize CFLAGS accordingly for all or a subset of the
> library.

True. I was just wondering if this might be a more sensible
default. Right now the default yields a library in which abort() is
basically useless...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]