Subject: Re: bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size

From: Eli Zaretskii <[email-masked]>
Date: Wed, 04 Sep 2024 15:21:16 +0300

> Date: Wed, 4 Sep 2024 09:28:47 +0200
> From:  martin rudalics via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
>  > To reproduce:
>  > 1. Open emacs -Q
>  > 2. Press C-x 2 to split the frame (top/bottom)
>  > 3. Make the terminal very small (I slowly resize the X window that's
>  > running urxvt, to the minimum size, 1 row and 2 columns in my case).
>  > This shrinking process alone can produce the crash when the window is
>  > around 5 lines high
>  > 4. It always crashes in my case. If it doesn't, make the terminal
>  > larger again, and repeat the resizing for some seconds until it
>  > crashes
>  >
>  > Note that the C-x 2 is required. The problem doesn't happen with a
>  > left/right split (C-x 3). But it happens after a C-x 3 C-x 2.
> 
> Kindly have a look at the fix I proposed here:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00054.html

Thanks, but could you tell how that change could have affected this
assertion violation?  AFAICT, adjust_frame_glyphs is not in the
backtrace, so how could moving code inside of it affect what happens
here?