From: Ioannis Kappas <ioannis.kappas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 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 18:12:06 +0000 [thread overview]
Message-ID: <8DC0758D-7497-4E96-B02C-7DADE1D26A24@gmail.com> (raw)
In-Reply-To: <83h7mrrel4.fsf@gnu.org>
Looks good, passes on both the original ert test case I’ve attached to the bug report and the particular case I’ve encountered the issue on (bringing down a REPL with cider).
> On 4 Feb 2021, at 16:18, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Ioannis Kappas <ioannis.kappas@gmail.com>
>> Date: Thu, 4 Feb 2021 07:36:23 +0000
>>
>> 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():
>
> Thanks for the analysis and the patch. I'd prefer to fix this in a
> slightly different way, which keeps the support for building Emacs
> with unexec. Does the following patch work for you?
>
> diff --git a/src/sysdep.c b/src/sysdep.c
> index f94ce4d..d100a5c 100644
> --- a/src/sysdep.c
> +++ b/src/sysdep.c
> @@ -1980,7 +1980,8 @@ init_signals (void)
> #endif
>
> #if !HAVE_DECL_SYS_SIGLIST && !defined _sys_siglist
> - if (! initialized)
> + if (! initialized
> + || dumped_with_pdumper_p ())
> {
> sys_siglist[SIGABRT] = "Aborted";
> # ifdef SIGAIO
next prev parent reply other threads:[~2021-02-04 18:12 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 ` bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's change description argument Previous Next Ioannis Kappas
2021-02-04 16:18 ` Eli Zaretskii
2021-02-04 18:12 ` Ioannis Kappas [this message]
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
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=8DC0758D-7497-4E96-B02C-7DADE1D26A24@gmail.com \
--to=ioannis.kappas@gmail.com \
--cc=46284@debbugs.gnu.org \
--cc=eliz@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).