Subject: bug#76238: 31.0.50; feature/igc: crash #2, 2025-02-12

From: Pip Cet <[email-masked]>
Date: Sat, 15 Feb 2025 00:40:32 +0000

"Oliver Reiter" <[email-masked]> writes:

> Pip Cet <[email-masked]> writes:
>
>> "Oliver Reiter via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" <[email-masked]> writes:
>>
>>> Dear all,
>>>
>>> a crash while marking a region:
>>
>> Thanks again!  I was hoping to fix bug#76237 first, but as that has me
>> stumped, can I get a "bt full" for this one, plus the following:
>>
>> x/79gx 0x7fffb9c07730
>>
>
> Sure, have a look here:

Thanks.  I did wonder why you were seeing so many crashes, and I suspect
that PGTK is the most likely explanation: the PGTK code puts Lisp
objects into malloc'd memory in a number of places, and that needs to be
fixed before it can work stably with MPS GC, I'm afraid.

I had a hard time triggering this, but ultimately succeeded.  I think
the most likely culprit (and what I used for my crash) is an "event"
device registered with PGTK: its name is stored in xmalloc'd memory, so
it will likely become invalid after a few collections, but it will be
exposed to Lisp (and the garbage collector) if an event from this device
ever fires.

I'm not sure what the best way forward is here; there's a lot of PGTK
code and fixing it might take some time, and I can't reliably test such
builds because PGTK does not support X, only Wayland.

OTOH, X builds should work fine on most Wayland displays, right?  Maybe
you could try running one of those in case it's a different problem
after all?

Anyway, thanks again for the report, and I'll let you know if I found
out more.

Pip