unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: n142857@gmail.com
Cc: 71176@debbugs.gnu.org
Subject: bug#71176: 30.0.50; Segmentation fault (SIGSEGV) in TTY+emacsclient, default_face is nil
Date: Sat, 25 May 2024 21:07:06 +0300	[thread overview]
Message-ID: <86o78tyddh.fsf@gnu.org> (raw)
In-Reply-To: <86plt9ye94.fsf@gnu.org> (message from Eli Zaretskii on Sat, 25 May 2024 20:48:07 +0300)

> Cc: 71176@debbugs.gnu.org
> Date: Sat, 25 May 2024 20:48:07 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> And also, please try the patch below.

Sorry, that is not enough.  Please try the patch below instead.

diff --git a/src/xdisp.c b/src/xdisp.c
index 7a00b29..47675fc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13377,8 +13377,10 @@ echo_area_display (bool update_frame_p)
   w = XWINDOW (mini_window);
   f = XFRAME (WINDOW_FRAME (w));
 
-  /* Don't display if frame is invisible or not yet initialized.  */
-  if (!FRAME_REDISPLAY_P (f) || !f->glyphs_initialized_p)
+  /* Don't display if frame is invisible or not yet initialized or
+     if redisplay is inhibited.  */
+  if (!FRAME_REDISPLAY_P (f) || !f->glyphs_initialized_p
+      || !NILP (Vinhibit_redisplay))
     return;
 
 #ifdef HAVE_WINDOW_SYSTEM
diff --git a/src/xfaces.c b/src/xfaces.c
index 5192b22..340f181 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4246,6 +4246,12 @@ DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face,
       /* This can be NULL (e.g., in batch mode).  */
       if (oldface)
 	{
+	  /* In some cases, realize_face below can call Lisp, which could
+             trigger redisplay.  But we are in the process of realizing
+             the default face, and therefore are not ready to do display.  */
+	  specpdl_ref count = SPECPDL_INDEX ();
+	  specbind (Qinhibit_redisplay, Qt);
+
 	  /* Ensure that the face vector is fully specified by merging
 	     the previously-cached vector.  */
 	  memcpy (attrs, oldface->lface, sizeof attrs);
@@ -4291,6 +4297,8 @@ DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face,
 			      gvec[LFACE_BACKGROUND_INDEX]);
 	      Fmodify_frame_parameters (frame, arg);
 	    }
+
+	  unbind_to (count, Qnil);
 	}
     }
 





  reply	other threads:[~2024-05-25 18:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 17:38 bug#71176: 30.0.50; Segmentation fault (SIGSEGV) in TTY+emacsclient, default_face is nil Daniel Clemente
2024-05-24 19:26 ` Eli Zaretskii
2024-05-25 11:04   ` Daniel Clemente
2024-05-25 12:42     ` Eli Zaretskii
2024-05-25 16:22       ` Daniel Clemente
2024-05-25 17:25         ` Eli Zaretskii
2024-05-25 17:48           ` Eli Zaretskii
2024-05-25 18:07             ` Eli Zaretskii [this message]
2024-05-26 10:58               ` Daniel Clemente
2024-05-26 11:04                 ` Daniel Clemente
2024-05-26 16:44                   ` Eli Zaretskii
2024-05-27 11:04                     ` Daniel Clemente
2024-05-27 12:39                       ` Eli Zaretskii
2024-05-26 17:55                 ` Eli Zaretskii
2024-05-27 11:05                   ` Daniel Clemente

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o78tyddh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71176@debbugs.gnu.org \
    --cc=n142857@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).