This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Avoid deadlock in malloc on backtrace
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org, carlos at redhat dot com
- Date: Wed, 25 Feb 2015 23:32:24 -0800
- Subject: Re: [PATCH] Avoid deadlock in malloc on backtrace
- Authentication-results: sourceware.org; auth=none
- References: <20150224100249 dot GA31871 at spoyarek dot pnq dot redhat dot com> <54EC52E6 dot 5010905 at redhat dot com> <20150224115158 dot GH23807 at spoyarek dot pnq dot redhat dot com> <54ECBA3D dot 90601 at cs dot ucla dot edu> <54ED94AC dot 3010502 at redhat dot com>
Florian Weimer wrote:
On 02/24/2015 06:51 PM, Paul Eggert wrote:
>'backtrace' shouldn't require 'malloc' to work, as we want 'backtrace' to get a
>backtrace as reliably as possible even when part of memory is corrupted.
That's simply not possible with an in-process backtrace.
Sure it is. I wasn't asking for backtrace to *always* work -- obviously that's
impossible in general. I'm asking only that it work as reliably as possible.
Siddhesh Poyarekar wrote:
> But how useful is the backtrace anyway?
It's used reasonably often by people who report Emacs bugs and who didn't happen
to have Emacs running under a debugger at the time. The procedure is documented
in the Emacs manual, at:
At this point we have a workaround (namely, have 'main' call 'backtrace' first
thing, as a no-op) so it's not high priority to fix the problem in glibc.
Still, it's an annoyance.