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]

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


Hello,

On my Linux PC, the libc (version 2.7) reports some useful information when i double free a pointer: a backtrace and a memory map.

The core file seems to be useless as the libs uses abort() in this case. E.g.:
(gdb) bt
#0 0xb7fbd424 in __kernel_vsyscall ()
#1 0xb7d53640 in raise () from /lib/i686/cmov/libc.so.6
#2 0xb7d55018 in abort () from /lib/i686/cmov/libc.so.6
#3 0xb7d903dd in ?? () from /lib/i686/cmov/libc.so.6
#4 0x00000004 in ?? ()
...


But, using the backtrace information from the libc, I have a good idea of where is the problem in my code.

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?

--
Greg


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