]> git.eshelyaron.com Git - emacs.git/commitdiff
* Work around GCC bug affecting Garbage Collection (bug#65727).
authorAndrea Corallo <acorallo@gnu.org>
Sat, 18 May 2024 06:59:17 +0000 (08:59 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 18 May 2024 18:52:53 +0000 (20:52 +0200)
* src/lisp.h (flush_stack_call_func): Prevent GCC sibling call
optimization to run with an asm inline.

(cherry picked from commit 19c983ddedf083f82008472c13dfd08ec94b615f)

src/lisp.h

index 41f8af35e8aa207b1ff539bda39946746eb78c12..8ee37f5298a664449e374101a3b5abea5c109439 100644 (file)
@@ -4479,6 +4479,12 @@ flush_stack_call_func (void (*func) (void *arg), void *arg)
 {
   __builtin_unwind_init ();
   flush_stack_call_func1 (func, arg);
+  /* Work around GCC sibling call optimization making
+     '__builtin_unwind_init' ineffective (bug#65727).
+     See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115132>.  */
+#if defined __GNUC__ && !defined __clang__
+  asm ("");
+#endif
 }
 
 extern void garbage_collect (void);