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: Sun, 08 Sep 2024 18:32:37 +0300

> Date: Sun, 8 Sep 2024 16:43:54 +0200
> Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> From: martin rudalics <[email-masked]>
> 
>  > In cmcheckmagic we have:
>  >        if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
>  >            emacs_abort ();
>  >
>  > Is this an assertion that needs to always hold?
> 
> I very strongly doubt so myself.  And strangely it's _always_ an
> off-by-one error here just as you sketched below.

I don't think it's an off-by-one.  It's simply that Emacs draws the
screen top to bottom, so the very first row that violates the
assertion by exceeding FrameRows is the only one that is seen.