GNU bug report logs - #76327
29.4; random segfaults after switch to tree-sitter

Previous Next

Package: emacs;

Reported by: Evgeniy Dushistov <dushistov <at> mail.ru>

Date: Sun, 16 Feb 2025 08:47:01 UTC

Severity: normal

Found in version 29.4

Full log


View this message in rfc822 format

From: Evgeniy Dushistov <dushistov <at> mail.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pipcet <at> protonmail.com, eggert <at> cs.ucla.edu, 76327 <at> debbugs.gnu.org, mattiasengdegard <at> gmail.com
Subject: bug#76327: 29.4; random segfaults after switch to tree-sitter
Date: Wed, 19 Feb 2025 19:43:23 +0300
On Wed, Feb 19, 2025 at 06:32:09PM +0200, Eli Zaretskii wrote:
> Is this still in Emacs 29.4, only with the above patch applied?  Or is
> this a different version of Emacs?

Yes, it emacs 29.4 with

Index: emacs-29.4/src/lisp.h
===================================================================
--- emacs-29.4.orig/src/lisp.h
+++ emacs-29.4/src/lisp.h
@@ -4229,8 +4229,14 @@ extern void mark_memory (void const *sta
 INLINE void
 flush_stack_call_func (void (*func) (void *arg), void *arg)
 {
-  __builtin_unwind_init ();
-  flush_stack_call_func1 (func, arg);
+  volatile bool repeat = true;
+  while (repeat)
+    {
+      __builtin_unwind_init ();
+      asm volatile ("" : : : "memory");
+      flush_stack_call_func1 (func, arg);
+      repeat = false;
+    }
 }
 
 extern void garbage_collect (void);

-- 
/Evgeniy




This bug report was last modified 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.