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

From: [email-masked]
Date: Sun, 18 Aug 2024 17:36:14 +0800

It's
```
Redefine command "xbacktrace"? (y or n) [answered Y; input not from terminal]
Redefine command "xprintbytestr"? (y or n) [answered Y; input not from terminal]
Redefine command "xwhichsymbols"? (y or n) [answered Y; input not from terminal]
Redefine command "hookpost-backtrace"? (y or n) [answered Y; input not from terminal]
Redefine command "ff"? (y or n) [answered Y; input not from terminal]
DISPLAY = :0
TERM = tmux-256color
Breakpoint 3 at 0x4736d9: file emacs.c, line 431.
Breakpoint 4 at 0x562640: file xterm.c, line 27093.
(gdb) frame 9
#9  0x00000000006dd64d in fontset_font (fontset=fontset@entry=XIL(0), c=c@entry=127802, face=face@entry=0x13fec610, id=-1) at fontset.c:793
793       rfont_def = fontset_find_font (fontset, c, face, id, 0);
(gdb) p *face->ascii_face
$1 = {
  lface = {XIL(0x8220), XIL(0x28bdef4), XIL(0x28bdf34), XIL(0xe340), make_fixnum(90), XIL(0xe340), XIL(0xe340), XIL(0), XIL(0), XIL(0x4417994), XIL(0x233c9c4), XIL(0), XIL(0), XIL(0), XIL(0x7f9ea6b05d63),
    XIL(0x765a8285), XIL(0), XIL(0x2aabee4), XIL(0x13500), XIL(0)},
  id = 2,
  gc = 0x0,
  stipple = 0,
  foreground = 4288059542,
  background = 4278190080,
  underline_color = 0,
  overline_color = 0,
  strike_through_color = 0,
  box_color = 4281545523,
  font = 0x1e4370d0,
  fontset = 5,
  box_vertical_line_width = -1,
  box_horizontal_line_width = -1,
  underline_pixels_above_descent_line = 0,
  box = FACE_SIMPLE_BOX,
  underline = FACE_NO_UNDERLINE,
  use_box_color_for_shadows_p = true,
  overline_p = false,
  strike_through_p = false,
  foreground_defaulted_p = false,
  background_defaulted_p = false,
  underline_defaulted_p = false,
  overline_color_defaulted_p = false,
  strike_through_color_defaulted_p = false,
  box_color_defaulted_p = true,
  underline_at_descent_line_p = false,
  tty_bold_p = false,
  tty_italic_p = false,
  tty_reverse_p = false,
  tty_strike_through_p = false,
  colors_copied_bitwise_p = false,
  overstrike = false,
  hash = 322003229,
  next = 0x13fec610,
  prev = 0x0,
  ascii_face = 0x4d7343a0,
  extra = 0x0
}
(gdb)
```

Eval Exec

On 8/18/24 5:34 PM, Pip Cet <[email-masked]> wrote:
> <[email-masked]> writes:
> 
> > It's
> > ```
> > (gdb) x/32gx (*(long *)&Vfontset_table - 5)
> > 0x4de32f40:     0x00000000000000f3      0x00007f9ea734b695
> > 0x4de32f50:     0x00000000028b8c65      0x00000000028bee1d
> > 0x4de32f60:     0x00000000765a7d45      0x00000000765a7fad
> > 0x4de32f70:     0x00000000765a83d5      0x00000000765a863d
> > 0x4de32f80:     0x00000000765a88a5      0x00000000765a8d55
> > 0x4de32f90:     0x00000000765a8fbd      0x00000000765a9225
> > 0x4de32fa0:     0x00000000765a948d      0x00000000765a96f5
> > 0x4de32fb0:     0x00000000765a995d      0x00000000765a9d65
> > 0x4de32fc0:     0x00000000765a9fcd      0x00000000765aa235
> > 0x4de32fd0:     0x00000000765aa49d      0x00000000765aa705
> > 0x4de32fe0:     0x00000000765aa96d      0x00000000765aad75
> > 0x4de32ff0:     0x00000000765aafdd      0x00000000765c2ce5
> > 0x4de33000:     0x0000000002ab84d5      0x00000000765c4e15
> > 0x4de33010:     0x00000000765dbf75      0x0000000000000000
> > 0x4de33020:     0x0000000000000000      0x0000000000000000
> > 0x4de33030:     0x0000000000000000      0x0000000000000000
> > (gdb)
> > ```
> 
> Thanks. It looks like the entry in the fontset table has been freed
> (that's entry 26, which is Qnil), but is still referenced by
> face->fontset.  Can you go back to the same stack frame in which you
> printed face and "p *face->ascii_face"?
> 
> Pip
> 
>