GNU bug report logs - #55760
28.1; SIGSEGV in 80x26 terminal window

Previous Next

Package: emacs;

Reported by: Ture Pålsson <ture <at> turepalsson.se>

Date: Thu, 2 Jun 2022 08:12:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 55760 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: ture <at> turepalsson.se
Cc: 55760 <at> debbugs.gnu.org
Subject: Re: bug#55760: 28.1; SIGSEGV in 80x26 terminal window
Date: Thu, 02 Jun 2022 13:50:56 +0300
> Cc: 55760 <at> debbugs.gnu.org
> Date: Thu, 02 Jun 2022 11:33:55 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Cc: ture <at> turepalsson.se
> > From: Ture Pålsson <ture <at> turepalsson.se>
> > Date: Thu, 02 Jun 2022 07:58:47 +0200
> > 
> > 
> > Running Emacs in a terminal window which is 26 rows by 80 columns
> > consistently causes a SIGSEGV. Other window sizes work fine. I can
> > reproduce on macOS/x86, macOS/Apple Silicon, Linux/x86 and Linux/ARM,
> > with xterm and Terminal.app, locally or at the other end of an ssh
> > session.
> 
> Thanks.  I can reproduce this, and will look into it.

Should hopefully be fixed now on the emacs-28 branch of the Emacs Git
repository.  The patch is below for your convenience; please try that
if you can and see if the problem went away.

Thanks.

diff --git a/src/dispnew.c b/src/dispnew.c
index 332ba54..39e5469 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1837,7 +1837,18 @@ adjust_frame_glyphs (struct frame *f)
   if (FRAME_WINDOW_P (f))
     adjust_frame_glyphs_for_window_redisplay (f);
   else
-    adjust_frame_glyphs_for_frame_redisplay (f);
+    {
+      adjust_frame_glyphs_for_frame_redisplay (f);
+      eassert (FRAME_INITIAL_P (f)
+	       || noninteractive
+	       || !initialized
+	       || (f->current_matrix
+		   && f->current_matrix->nrows > 0
+		   && f->current_matrix->rows
+		   && f->desired_matrix
+		   && f->desired_matrix->nrows > 0
+		   && f->desired_matrix->rows));
+    }
 
   /* Don't forget the buffer for decode_mode_spec.  */
   adjust_decode_mode_spec_buffer (f);
@@ -2119,6 +2130,19 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
 	  SET_FRAME_GARBAGED (f);
 	}
     }
+  else if (!FRAME_INITIAL_P (f) && !noninteractive && initialized)
+    {
+      if (!f->desired_matrix->nrows || !f->desired_matrix->rows)
+	{
+	  adjust_glyph_matrix (NULL, f->desired_matrix, 0, 0, matrix_dim);
+	  SET_FRAME_GARBAGED (f);
+	}
+      if (!f->current_matrix->nrows || !f->current_matrix->rows)
+	{
+	  adjust_glyph_matrix (NULL, f->current_matrix, 0, 0, matrix_dim);
+	  SET_FRAME_GARBAGED (f);
+	}
+    }
 }
 
 




This bug report was last modified 3 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.