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:07:35 +0000

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

>> Date: Sun, 18 Aug 2024 14:59:51 +0000
>> From: Pip Cet <[email-masked]>
>> Cc: [email-masked], [email-masked]
>>
>> >> I was under the impression two faces could share the same fontset.  That
>> >> certainly is what my debugging sessions so far indicate.  Maybe that's
>> >> the bug?
>> >
>> > We are talking about a fontset identified by face->fontset.  AFAIU,
>> > face->fontset is only non-negative for so-called "ASCII faces".
>>
>> Not what I'm seeing. base_face->fontset is copied into the new face by
>> realize_non_ascii_face.
>
> Where do you see this copying in realize_non_ascii_face?

static struct face *
realize_non_ascii_face (struct frame *f, Lisp_Object font_object,
			struct face *base_face)
{
  struct face_cache *cache = FRAME_FACE_CACHE (f);
  struct face *face;

  face = xmalloc (sizeof *face);
  *face = *base_face;
        ^____ here

(The entire structure is copied, and fontset isn't explicitly changed
afterwards).

Pip