GNU bug report logs - #77046
31.0.50; Emacs sometimes crashes

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sun, 16 Mar 2025 09:56:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77046 <at> debbugs.gnu.org, Markus Triska <triska <at> metalevel.at>
Subject: bug#77046: 31.0.50; Emacs sometimes crashes
Date: Sun, 16 Mar 2025 12:30:39 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Gerd, any comments for the patch?  I found that
> combine_updates_for_frame was trying to combine updates for a
> topmost_child frame whose after_make_frame flag was false and whose
> desired_matrix was NULL.  That caused a segfault in
> make_matrix_current, called from copy_child_glyphs, when make_current
> dereferenced the pointer to desired_matrix.  AFAIU, we should not even
> try redisplaying such frames.
>
> diff --git a/src/xdisp.c b/src/xdisp.c
> index ac65493..d7e0691 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -17569,7 +17569,10 @@ #define AINC(a,i)							\
>  	  if (is_tty_frame (f))
>  	    {
>  	      /* Ignore all invisible tty frames, children or root.  */
> -	      if (!frame_redisplay_p (f))
> +	      if (!frame_redisplay_p (f)
> +		  /* Ignore frames not yet completely made, which we
> +		     cannot safely redisplay.  */
> +		  || !f->after_make_frame)
>  		continue;
>  
>  	      /* Remember tty root frames which we've seen.  */
>

Yes, I think your patch is correct.

(I wonder a bit though, how redisplay got its hands on that child frame.
OTOH. the OP's .el with make-frame/delete-frame and redisplays in a
tight loop is something so unusual...)




This bug report was last modified 84 days ago.

Previous Next


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