GNU bug report logs - #79318
31.1.90; Threads + receiving a signal causes a segfault

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 26 Aug 2025 16:21:02 UTC

Severity: normal

Found in version 31.1.90

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>,
 Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 79318 <at> debbugs.gnu.org
Subject: Re: bug#79318: 31.1.90; Threads + receiving a signal causes a segfault
Date: Tue, 26 Aug 2025 21:45:03 +0300
> Date: Tue, 26 Aug 2025 12:19:07 -0400
> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 
> repro.el:
> 
> (make-thread
>  (lambda ()
>    (sleep-for .1)
>    (signal-process (emacs-pid) 'sigint)))
> (sleep-for 100)
> 
> emacs -Q -l ./repro.el
> 
> Observe Emacs crashes with a segfault while shutting down.

I don't see a segfault in your backtrace, only a shutdown due to
SIGINT (which is a fatal signal in the configuration you ran -- Paul,
am I right?)

> In gdb, the segfault appears to be because current_thread is NULL.

Please show the backtrace from the segfault.  What you posted was a
SIGINT that caused shutdown, which seems to be normal (in the GUI
session on X).  On Windows and in -nw session, there's no shutdown.

Why is this case interesting?  When delivering a fatal signal to the
own Emacs process, a fatal error and a shutdown should not come as a
surprise, right?  Or what am I missing?




This bug report was last modified 11 days ago.

Previous Next


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