Subject: bug#79131: 31.0.50; igc: nested signal, SIGSEGV

From: Pip Cet <[email-masked]>
Date: Sun, 03 Aug 2025 14:58:34 +0000

Óscar Fuentes <[email-masked]> writes:

> Pip Cet <[email-masked]> writes:
>
>> So can you try
>>
>>     p current_buffer->pt
>
> (gdb) fr 13
> #13 0x000055e77414774b in Fadd_text_properties (start=0x1f06a, end=0x1f07a, properties=<optimized out>,
>     object=0x0) at ../../emacs/src/textprop.c:1308
> 1308      return add_text_properties_1 (start, end, properties, object,
> (gdb) p current_buffer->pt
> $1 = 5961
>
>>     p *XSTRING(current_buffer->name_)
>
> (gdb) p *XSTRING(current_buffer->name_)
> No symbol "XSTRING" in current context.

Can you tell us more about the buffer, though? It was a treesitter-mode
buffer that changed before the crash and contained about 32K of text?

> (gdb) p current_buffer->text->beg + 1153 + 31770
> $6 = (unsigned char *) 0x55e77e16001b
>
> shows the last 22 characters of the buffer without garbage at the end.

Oh. I messed up there; the buffer contained 31774 characters, but more
bytes than that sice some of the characters were non-ASCII.

> Probably you are right and this is not a MPS-related crash.

I think it's a bug flushed out by the way that MPS interrupts Emacs at
"random" points and does some work, making it much more likely to hit
C-g in tight loops which don't really expect Vquit_flag to be set.

But I'll wait for others to weigh in; maybe my theory is obviously
incorrect.

My lesson so far is to keep running with a non-zero pause time, even
though I find a pause time of 0.0 works better for me.

Pip