Subject: Re: bug#54188: Crash when eval-ing font test elisp code

From: Eli Zaretskii <[email-masked]>
Date: Tue, 01 Mar 2022 19:38:14 +0200

> Date: Tue, 1 Mar 2022 17:23:32 +0200
> Cc: [email-masked]
> From: Vordoo <[email-masked]>
> 
> Attached is gdb.txt (bt full output) from:

Thanks.

> #0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647)
>     at /home/wsx/dev/emacs/emacs29/emacs/src/emacs.c:408
> #1  0x00005555558172c7 in die
>     (msg=0x5555559f6dc8 "fontset_id_valid_p (face->fontset)", file=0x5555559996c4 "fontset.c", line=925) at /home/wsx/dev/emacs/emacs29/emacs/src/alloc.c:7547
> #2  0x0000555555946ade in face_for_char
>     (f=0x55555635ae50, face=0x555556816410, c=84, pos=746, object=XIL(0))
>     at /home/wsx/dev/emacs/emacs29/emacs/src/fontset.c:925
>         fontset = make_fixnum(23456248177639)
>         rfont_def = XIL(0x7fffffff7170)
>         charset = XIL(0x555555ef2400)
>         face_id = 0
>         id = 0
> #3  0x00005555555cafec in FACE_FOR_CHAR
>     (f=0x55555635ae50, face=0x555556816410, character=84, pos=746, object=XIL(0))
>     at /home/wsx/dev/emacs/emacs29/emacs/src/dispextern.h:1908
> #4  0x00005555555ead78 in get_next_display_element (it=0x7fffffff8800)
>     at /home/wsx/dev/emacs/emacs29/emacs/src/xdisp.c:8012
>         pos = 746
>         c = 84
>         face = 0x555556816410
>         success_p = true

Please show what these GDB commands produce:

 (gdb) fr 2
 (gdb) p face->fontset
 (gdb) fr 4
 (gdb) p it->face_id
 (gdb) p it->f->face_cache->used