all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ioannis Kappas <ioannis.kappas@gmail.com>
To: 46284@debbugs.gnu.org
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	[thread overview]
Message-ID: <CAMRHuGA5cDbcOKdondfxMQLU0nzZ-q_4MFs7ab1SOqcS2DTSrg@mail.gmail.com> (raw)
In-Reply-To: <CAMRHuGB9j3ZT9oW=0T17+RyVBHa5F8LqWSOYkx=kV5LibF+iAg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 2747 bytes --]

  reply	other threads:[~2021-02-04  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 22:50 bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's change description argument Ioannis Kappas
2021-02-04  7:36 ` Ioannis Kappas [this message]
2021-02-04 16:18   ` bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's change description argument Previous Next Eli Zaretskii
2021-02-04 18:12     ` Ioannis Kappas
2021-02-04 18:22       ` Eli Zaretskii
2021-04-21  3:04         ` bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's change description argument Stefan Kangas
2021-04-21  8:52           ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=CAMRHuGA5cDbcOKdondfxMQLU0nzZ-q_4MFs7ab1SOqcS2DTSrg@mail.gmail.com \
    --to=ioannis.kappas@gmail.com \
    --cc=46284@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.