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

From: Vordoo <[email-masked]>
Date: Tue, 1 Mar 2022 20:50:48 +0200

On 3/1/22 19:38, Eli Zaretskii wrote:

#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

(gdb) fr 2
#2  0x0000555555946ade in face_for_char (f=0x555556390770, face=0x555556528510, c=84, pos=744, object=XIL(0))
at /home/wsx/dev/emacs/emacs29/emacs/src/fontset.c:925
925      eassert (fontset_id_valid_p (face->fontset));
(gdb) p face->fontset
$1 = -1
(gdb) fr 4
#4  0x00005555555ead78 in get_next_display_element (it=0x7fffffff8800)
at /home/wsx/dev/emacs/emacs29/emacs/src/xdisp.c:8012
8012          it->face_id = FACE_FOR_CHAR (it->f, face, c, pos, it->string);
(gdb) p it->face_id
$2 = 34
(gdb) p it->f->face_cache->used
$3 = 35
(gdb)