From: Paul Eggert Date: Thu, 5 Mar 2015 19:58:56 +0000 (-0800) Subject: Work around x86 glibc backtrace bug X-Git-Tag: emacs-25.0.90~2564^2~215 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cbc9d8d4269f2cca7950060b5e37747b27dac1de;p=emacs.git Work around x86 glibc backtrace bug * sysdep.c (emacs_backtrace): Don't dump core on x86. Fixes: bug#19959 --- diff --git a/src/ChangeLog b/src/ChangeLog index ae827cb4416..6b658f51671 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2015-03-05 Paul Eggert + + Work around x86 glibc backtrace bug + * sysdep.c (emacs_backtrace): Don't dump core on x86. + Fixes: bug#19959 + 2015-03-05 Eli Zaretskii * keyboard.c (make_lispy_position): When the click is on the diff --git a/src/sysdep.c b/src/sysdep.c index cb361ec2dc5..0a0b0ac01d0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2174,6 +2174,14 @@ emacs_backtrace (int backtrace_limit) else { buffer = main_backtrace_buffer; + + /* Work around 'backtrace' bug; see Bug#19959 and glibc bug#18084. */ + if (bounded_limit < 0) + { + backtrace (buffer, 1); + return; + } + npointers = backtrace (buffer, bounded_limit + 1); }