]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around x86 glibc backtrace bug
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Mar 2015 19:58:56 +0000 (11:58 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Mar 2015 19:59:31 +0000 (11:59 -0800)
* sysdep.c (emacs_backtrace): Don't dump core on x86.
Fixes: bug#19959
src/ChangeLog
src/sysdep.c

index ae827cb441671d924bc9ed69ec22d24c0f24fb72..6b658f51671caae6e2b10df4f08a8d5d76569ebb 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Work around x86 glibc backtrace bug
+       * sysdep.c (emacs_backtrace): Don't dump core on x86.
+       Fixes: bug#19959
+
 2015-03-05  Eli Zaretskii  <eliz@gnu.org>
 
        * keyboard.c (make_lispy_position): When the click is on the
index cb361ec2dc517ff59a9d7500ed2df8da43e14a36..0a0b0ac01d006107972c63f8993e3bacb2c0b7dc 100644 (file)
@@ -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);
     }