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


Message #74 received at 76327 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefankangas <at> gmail.com>
Cc: 76327 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Evgeniy Dushistov <dushistov <at> mail.ru>,
 Mattias EngdegÄrd <mattiasengdegard <at> gmail.com>
Subject: Re: bug#76327: 29.4; random segfaults after switch to tree-sitter
Date: Tue, 18 Feb 2025 18:16:58 +0000
Pip Cet <pipcet <at> protonmail.com> writes:

> The asm statement is probably unnecessary.
>
> I'll try figuring out which compiler option is to blame now.

Bug#65727 appears to be the relevant one.  Maybe the fix should be
backported?

INLINE void
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__ && !defined __OBJC__
  asm ("");
#endif
}

Evgeniy, GC bugs like this one are hard to diagnose.  Sorry this took so
long.

Eli, Stefan K, what should be done with Emacs 29.4? If more binaries
like the one produced by Arch Linux are out there, people are most
likely to observe unstable Emacs systems, even if they don't end up
reporting bugs here.

Between this, the setjmp "scrambling" issues affecting MPS, and the way
-fanalyze=address breaks conservative GC, it seems like we really should
ask the GCC folks for an option to support conservative GC, and provide
appropriate builtins.  Maybe clang would follow suit.

Pip





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.