Subject: bug#70385: Crash in note_fringe_highlight

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Apr 2024 19:40:05 +0300

> From: Juri Linkov <[email-masked]>
> Date: Sun, 14 Apr 2024 19:10:16 +0300
> 
> Hopefully this backtrace could help to find where is the bug:
> 
> Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
> 0x00005555556120fe in note_fringe_highlight (part=<optimized out>, y=<optimized out>, x=<optimized out>, window=XIL(0x5555564aa62d)) at xdisp.c:35762
> 35762	  struct glyph *glyph = MATRIX_ROW_GLYPH_START (w->current_matrix, vpos);
> 
> (gdb) bt
> #0  0x00005555556120fe in note_fringe_highlight (part=<optimized out>, y=<optimized out>, x=<optimized out>, window=XIL(0x5555564aa62d)) at xdisp.c:35762

Can you reproduce at will?  If so, what does the below show in GDB,
when Emacs segfaults and GDB kicks in?

  (gdb) p w->current_matrix
  (gdb) p w->current_matrix->rows
  (gdb) p w->current_matrix->nrows
  (gdb) p w->window_end_valid
  (gdb) p window_outdated (w)

Vladimir, can you please look into this?