Subject: Re: bug#72692: Emacs 31.05 (40eecd594ac) get SIGSEGV on Linux (Linux 6.6.45 Kde Wayland)

From: Pip Cet <[email-masked]>
Date: Mon, 19 Aug 2024 06:28:32 +0000

"Eli Zaretskii" <[email-masked]> writes:

> Here's one data point: this kind of problem has never, NEVER happened
> to me, although I display non-ASCII text in my Emacs sessions quite a
> lot.  So if what you describe is so trivially easy to trigger, how
> come it didn't happen to me, in all the years I'm using this code?

It isn't trivially easy to trigger at all! To trigger it reliably, you
need to:

* apply the patch so we don't reuse fontset table entries, which
  otherwise hides the bug
* modify the mode line to use two new non-ASCII faces, at once, by
  inserting two characters provided by different fonts
* modify the right frame parameter (such as alpha-background) so that
  the basic faces are re-realized ('free_realized_face' is called for
  them), but 'free_realized_faces' is not.
* be unlucky in your choice of malloc implementation

> There has to be more to this than meets the eye, and we can only
> figure this out if you provide all the missing details.

I don't think there is, at this point, but I'm happy to investigate
further to gain some confidence about that.

In particular, I'd like to understand why we need to use two non-ASCII
faces at once.

Pip