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 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.

> If you link with the debugging C library, -lc_g, you'll get debugging
> info back past abort().
>
> (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.

Cheers,
Carlos.


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