From: Andrea Corallo Date: Sat, 18 May 2024 06:59:17 +0000 (+0200) Subject: * Work around GCC bug affecting Garbage Collection (bug#65727). X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3a58869e87d22caec4818e780adc42a7de67521e;p=emacs.git * Work around GCC bug affecting Garbage Collection (bug#65727). * src/lisp.h (flush_stack_call_func): Prevent GCC sibling call optimization to run with an asm inline. (cherry picked from commit 19c983ddedf083f82008472c13dfd08ec94b615f) --- diff --git a/src/lisp.h b/src/lisp.h index 41f8af35e8a..8ee37f5298a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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 . */ +#if defined __GNUC__ && !defined __clang__ + asm (""); +#endif } extern void garbage_collect (void);