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 #50 received at 76327 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: bug-gnu-emacs <at> gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Evgeniy Dushistov <dushistov <at> mail.ru>, 76327 <at> debbugs.gnu.org
Subject: Re: bug#76327: 29.4; random segfaults after switch to tree-sitter
Date: Tue, 18 Feb 2025 15:38:43 +0000
"Evgeniy Dushistov via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" <bug-gnu-emacs <at> gnu.org> writes:

> On Tue, Feb 18, 2025 at 04:55:38PM +0200, Eli Zaretskii wrote:
>> The crash is here:
>>
>> 	if (CONSP (event->arg))
>> 	  return list5 (head, position, make_fixnum (double_click_count),
>> 			XCAR (event->arg), Fcons (XCAR (XCDR (event->arg)),
>> 						  XCAR (XCDR (XCDR (event->arg)))));
>>
>> It's an assertion violation, which probably means XCAR(event->arg) is
>> not a cons cell.  So it would be important to see the exact value of
>> event->arg at this point.  Like this:
>>
>>   (gdb) fr 5
>>   (gdb) pp event->arg
>>
>> If GDB says it doesn't know about "pp", do this:
>>
>>   (gdb) source /path/to/emacs/stc/.gdbinit
>>
>> and then repeat the above 2 commands.
>>
>
> (gdb) fr 5
> #5  make_lispy_event (event=0x555555f308e0 <kbd_buffer+13952>) at keyboard.c:6375
> warning: Source file is more recent than executable.
> 6375		  return list5 (head, position, make_fixnum (double_click_count),
> (gdb) pp event->arg
> (33558466)

So XCDR (event->arg) is nil, not a cons cell, and its car is also not
what it should be.  (My reading of xterm.c is that it should be Qnil,
and there should be floats in the list following the nil).

The car would be XLI(0x8003f0a), but that doesn't ring any immediate
bells (it might be a weird character with a shift modifier, but not an
ASCII one...)

So this still seems like a GC issue.

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.