This is the mail archive of the libc-alpha@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: [PATCH] Avoid deadlock in malloc on backtrace


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:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Crashing.html

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.



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