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: Tue, 25 Nov 2008 08:43:10 -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=RXhD66CVL7B/s91tk10gk5Q5Ig4HNQg/0L7Yivp+jWo=; b=mjJppbIW/ml6hJStkq47YAaJyTNb7zhVO22/pq0xhlzotS9N8HeLLfuDYVc+UnUWn2 8R3Dk2Dp7TIk95iJicCnX9g4xhwvMTIGtON8l/zYnfcVlpLMEcIow6DCWFTnAI9PGGb6 m14sGtN+mHxhmcJQPJLNs0cwsKsMCJeHphlyY=
- 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=KLWjZ8igQoNr3bFO/3h0SHLY2MdBnj5yVwPtAzQbuhbyKL6NsqJZS9w2JgqK8/UHKw XW3rnHMM8iYQJOkNbIypdYgqkCKLFW707GqSJDriWg1XCXsVp5ogUpJh6i1mBMyVs2TF kJxOn+/Nrtooi0RJ4w/RQ/+mjOpCRahPlSKtA=
- References: <49185673.3050302@ge.com> <87zljqnhhr.fsf@hades.wkstn.nix> <119aab440811240739xe61718se7ea0395834b6087@mail.gmail.com> <87iqqcohib.fsf@hades.wkstn.nix>
On Mon, Nov 24, 2008 at 6:01 PM, Nix <nix@esperi.org.uk> wrote:
>> 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?
In GCC the unwind tables are DWARF2 call frame information, and the
implementation of backtrace() for some targets, including x86, use
this information to correctly unwind the stack. However, the later
requires that your distribution build all the system shared libraries
with unwind information.
>>> (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...
I do not believe that is as useful as you think, and if you do, then
patch glibc.
What most users really want is the entire library compiled with debug
information, which is what debian already provides.
Cheers,
Carlos.