bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size
りすりす / TwoSquirrels <[email protected]> Sun, 2 Aug 2026 01:59:37 +0900
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <CA+0NueaU04abmQgeFySJ1rtv8gnww26t4sOhDEG+_SHgWRXbWg@mail.gmail.com> |
I tried changing the emacs_abort() in cmcheckmagic to mark the frame
garbaged instead:
--- a/src/cm.c
+++ b/src/cm.c
@@ -119,7 +119,10 @@ cmcheckmagic (struct tty_display_info *tty)
if (curX (tty) == FrameCols (tty))
{
if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
- emacs_abort ();
+ {
+ SET_FRAME_GARBAGED (XFRAME (tty->top_frame));
+ return;
+ }
if (tty->termscript)
putc ('\r', tty->termscript);
putc ('\r', tty->output);
With this patch on emacs-30, the recipe does not crash any more. The
display comes back correctly when the terminal becomes large enough
again. The same build crashes without the patch.
I am not sure if this is the correct fix. It only skips the abort and
leaves the redrawing to the next redisplay.