Subject: Re: bug#65198: 29.1; Emacs29.1 crash in function face_for_font

From: 张云峰 <[email-masked]>
Date: Fri, 11 Aug 2023 22:21:11 +0800

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x0000555555616206 in produce_glyphless_glyph (it=0x7fffffff6cc0,
for_no_font=for_no_font@entry=false, acronym=acronym@entry=0x0) at
xdisp.c:31791
31791 font = face->font ? face->font : FRAME_FONT (it->f);
(gdb) p it->face_id
$1 = 0
(gdb) p it->c
$2 = 9888
(gdb) p FRAME_FONT(it->f)
No symbol "FRAME_FONT" in current context.
(gdb) p (it->f)->output_data.x->font
There is no member named font.
(gdb) p face
Cannot access memory at address 0x120
(gdb) p FACE_FROM_ID (it->f, it->face_id)->ascii_face
No symbol "FACE_FROM_ID" in current context.
(gdb) p it->what
$3 = IT_GLYPHLESS

Eli Zaretskii <[email-masked]> 于2023年8月11日周五 14:12写道：
>
> > From: 张云峰 <[email-masked]>
> > Date: Fri, 11 Aug 2023 08:50:04 +0800
> > Cc: [email-masked]
> >
> > more clear GDB info:
> >
> > Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
> > 0x0000555555618c06 in produce_glyphless_glyph (it=0x7fffffff67d0,
> > for_no_font=for_no_font@entry=false, acronym=acronym@entry=0x0) at
> > xdisp.c:31791
> > 31791 font = face->font ? face->font : FRAME_FONT (it->f);
>
> Actually, this is progress: we are now crashing a bit later, while
> trying to display an empty box instead of a character that has no font
> and no suitable face.  To resolve this, please help me by providing
> the results of the following GDB commands after Emacs crashes and GDB
> kicks in:
>
>  (gdb) p it->face_id
>  (gdb) p it->c
>  (gdb) p FRAME_FONT(it->f)
>  (gdb) p (it->f)->output_data.x->font
>
> Thanks.