bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's


From: Ioannis Kappas
Subject: bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's change description argument Previous Next
Date: Thu, 4 Feb 2021 07:36:23 +0000

Analysis of the issue

It appears as if the underlying signal number to description conversion
method is broken in emacs-27 on windows-nt causing the regression.

Looking at the code, it looks like the issue is around the area which
attempts to convert a signal number to a string description. On emacs
version prior and including emacs-27, the conversion is done by
directly accessing the _sys_siglist[] table provided in the unix
systems, mapping signal numbers to signal descriptions, e.g. SIGINT ->
"Interrupted". On native windows though, this table does not exist, and
emacs simulates it in src/sysdep.c:init_signals() so as to conform with
the rest of the code which expects this table to be there.

init_signals() only populates the descriptions in the C table when emacs is not
!initialized, i.e. during the dumping phase. When emacs is thus ran
normally, it expects this table to have been loaded from the dump into
memory.

This table though does not appear to make it through to the dump in
emacs-27.  Having a look at the new pdumper, it looks like that it
performs differently than its predecessor. It seems as if it
only cover lisp constructs, while Unexec was also dumping the data
section of the process from memory? If true then, it implies that this
table is not eligible for dumping any more (since it is a C array), but should always be
initialised when emacs is invoked by the user.  This has a very
simple solution, taking out the if (!initialized) line in
src/sysdep.c:init_signals():

diff --git a/src/sysdep.c b/src/sysdep.c
index f94ce4d492..5b4ec68e6b 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1980,7 +1980,6 @@ init_signals (void)
 #endif
 
 #if !HAVE_DECL_SYS_SIGLIST && !defined _sys_siglist
-  if (! initialized)
     {
       sys_siglist[SIGABRT] = "Aborted";
 # ifdef SIGAIO

The ert test attached to this bug report then passes.

The above is not an issue in emacs-28 because the conversion from
signal number to description is delegated to Gnulib with Paul Eggert's
df589d36817a8804d67f133890b2f453aefdf3c1 "Simplify by using Gnulib
sigdescr_np module" commit.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]