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

From: Óscar Fuentes <[email-masked]>
Date: Sun, 03 Aug 2025 17:35:40 +0200

Pip Cet <[email-masked]> writes:

> 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?

Yes, yes and yes.

>> (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.

The buffer contains non-ASCII characters.

>> 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.

About what you asked elsewhere, I think I didn't press C-g, but at this
point I'm very far from certain, so don't discard that hypothesis.

> 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.