summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo <acorallo@gnu.org>2024-05-18 08:59:17 +0200
committerAndrea Corallo <acorallo@gnu.org>2024-05-18 09:03:53 +0200
commit19c983ddedf083f82008472c13dfd08ec94b615f (patch)
treef65cbb7f2eeffc21473a9ccf614d3c5e12cd6302 /src
parentdb039399cccd38b767bf6a30ba6c5da593eb69cf (diff)
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h6
1 files changed, 6 insertions, 0 deletions
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 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115132>. */
+#if defined __GNUC__ && !defined __clang__
+ asm ("");
+#endif
}
extern void garbage_collect (void);