This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: How to debug "*** glibc detected *** double free or corruption" bugs?
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Nix <nix at esperi dot org dot uk>
- Cc: "Gregoire Banderet" <gregoire dot banderet at ge dot com>, libc-help at sourceware dot org
- Date: Mon, 24 Nov 2008 10:39:00 -0500
- Subject: Re: How to debug "*** glibc detected *** double free or corruption" bugs?
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=eHF0B39smUwYI4rm5ZK2G0O1+V0N+08BDXoxPiRyCk0=; b=MnFMPpmIp4jGqjuZHyzPA9gB+RYn1cN4zzWW9g2yiJApKkx1fMuQ1PkI8+VlIt85qK 88EO4GCpORyojyOJc/puLfd04AWfdYHjmIJAlO6HBRLJ6HwpUYPmX04rTDWYJH5zC0Ui LaT0nGvmZI39mjyCrEeDSUHLn7bR5+RmWQ4yg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=EdNyva5bpqfQulfiZjeKTki4U34QzaAFleZbivK2xFpLqClV+yE/qelQA2HNPQwkEU Zdf48pSvNf0IqDIXjNSeEATeYLb1LEbb4rDFlKeSy4IteLLOcmKpG01a+NAzILB+OyCm vHu1byl5Pjuormev2QF4gfpbSQTiuQqshmn+g=
- References: <49185673.3050302@ge.com> <87zljqnhhr.fsf@hades.wkstn.nix>
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.