From: Jim Porter <jporterbugs@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: server.el test failures (was: Re: bug#9800: Incomplete truncated file buffers from the /proc filesystem)
Date: Thu, 23 Feb 2023 18:20:39 -0800 [thread overview]
Message-ID: <c0791700-72df-1cc2-784b-f3417a90eda6@gmail.com> (raw)
In-Reply-To: <5a38c18d-263c-223b-7335-8395a10eb494@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 806 bytes --]
On 2/23/2023 4:50 PM, Jim Porter wrote:
> Since the last message I posted, I'm now also seeing this test fail,
> though I get a segfault instead. I bisected this to commit
> a555abc56d5270cebe94f904189526d7ac433a94 ("Fix order of faces in
> 'face-list'").
>
> I'm pretty surprised by this, since that patch is *very* simple, but I
> can reliably segfault with it, and never segfault without it. I'll keep
> digging to see what's going on here.
The segfault is in FACE_FROM_ID_OR_NULL, called from
Finternal_merge_in_global_face. It happens because the face_cache is
null during these tests (since Emacs is noninteractive).
The attached patch fixes the issue for me, though I'm not totally sure
it's the *right* fix. Any thoughts? (I'm also not 100% sure this is the
same issue you're seeing...)
[-- Attachment #2: 0001-Fix-segmentation-fault-when-merging-faces-in-a-nonin.patch --]
[-- Type: text/plain, Size: 1093 bytes --]
From bcc1c44dcfaeab391cd85ec104ffa279f28409e4 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Thu, 23 Feb 2023 18:16:28 -0800
Subject: [PATCH] Fix segmentation fault when merging faces in a noninteractive
Emacs
* src/xfaces.c (internal-merge-in-global-face): Signal an error when
'noninteractive' is true.
---
src/xfaces.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/xfaces.c b/src/xfaces.c
index 62d7823f308..0310d328b8f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4162,6 +4162,13 @@ DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face,
Lisp_Object global_lface, local_lface, *gvec, *lvec;
struct frame *f = XFRAME (frame);
+ /* If this process is noninteractive, we likely don't have a face
+ cache, so attempts to use it below would segfault. */
+ if (noninteractive)
+ {
+ error ("Attempt to merge faces in noninteractive Emacs");
+ }
+
CHECK_LIVE_FRAME (frame);
global_lface = lface_from_face_name (NULL, face, true);
local_lface = lface_from_face_name (f, face, false);
--
2.25.1
next prev parent reply other threads:[~2023-02-24 2:20 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <877h40vb8h.fsf@mail.jurta.org>
[not found] ` <4EA4D31B.4050604@cs.ucla.edu>
[not found] ` <E1RISPO-0007Eu-TE@fencepost.gnu.org>
[not found] ` <4EA5E08D.8070903@cs.ucla.edu>
[not found] ` <861qmvcglp.fsf@aarsen.me>
[not found] ` <f711f43f-6892-f849-21ec-26376c351f11@cs.ucla.edu>
2023-02-13 21:55 ` server.el test failures (was: Re: bug#9800: Incomplete truncated file buffers from the /proc filesystem) Jim Porter
2023-02-14 2:47 ` Paul Eggert
2023-02-15 7:06 ` Jim Porter
2023-02-15 18:20 ` Paul Eggert
2023-02-23 23:42 ` Paul Eggert
2023-02-24 0:50 ` Jim Porter
2023-02-24 2:20 ` Jim Porter [this message]
2023-02-24 3:25 ` Po Lu
2023-02-24 3:38 ` Jim Porter
2023-02-24 7:52 ` Eli Zaretskii
2023-02-24 17:48 ` Jim Porter
2023-02-24 18:37 ` Eli Zaretskii
2023-02-24 19:45 ` Alan Mackenzie
2023-02-24 20:31 ` Jim Porter
2023-02-24 20:47 ` Eli Zaretskii
2023-02-26 8:29 ` Paul Eggert
2023-02-26 9:47 ` Eli Zaretskii
2023-02-27 5:31 ` Jim Porter
2023-02-27 16:40 ` server.el test failures Robert Pluim
2023-02-27 16:50 ` Eli Zaretskii
2023-02-27 18:14 ` Robert Pluim
2023-02-27 18:39 ` Eli Zaretskii
2023-02-28 7:42 ` Robert Pluim
2023-02-28 12:13 ` Eli Zaretskii
2023-02-28 13:05 ` Robert Pluim
2023-02-28 19:02 ` Jim Porter
2023-02-28 19:23 ` Eli Zaretskii
2023-02-28 19:41 ` Jim Porter
2023-03-01 8:22 ` Robert Pluim
2023-03-02 22:15 ` Jim Porter
2023-03-03 7:00 ` Eli Zaretskii
2023-03-03 7:15 ` Jim Porter
2023-03-03 8:00 ` Jim Porter
2023-03-03 8:10 ` Eli Zaretskii
2023-03-03 17:27 ` Jim Porter
2023-03-03 8:16 ` Robert Pluim
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=c0791700-72df-1cc2-784b-f3417a90eda6@gmail.com \
--to=jporterbugs@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/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).