From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46284: 27.1; emacs-27: windows-nt regression with process sentinel's change description argument Previous Next Date: Thu, 04 Feb 2021 18:18:47 +0200 Message-ID: <83h7mrrel4.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39459"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46284@debbugs.gnu.org To: Ioannis Kappas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 04 17:24:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7hRD-000A9u-RB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Feb 2021 17:24:59 +0100 Original-Received: from localhost ([::1]:56828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7hRC-0000rw-RE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Feb 2021 11:24:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7hLS-0003EE-Ev for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 11:19:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7hLS-0003Fo-8M for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 11:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7hLS-00067U-58 for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 11:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2021 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46284 X-GNU-PR-Package: emacs Original-Received: via spool by 46284-submit@debbugs.gnu.org id=B46284.161245553423512 (code B ref 46284); Thu, 04 Feb 2021 16:19:02 +0000 Original-Received: (at 46284) by debbugs.gnu.org; 4 Feb 2021 16:18:54 +0000 Original-Received: from localhost ([127.0.0.1]:42101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7hLK-000679-CS for submit@debbugs.gnu.org; Thu, 04 Feb 2021 11:18:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7hLI-00066v-Qh for 46284@debbugs.gnu.org; Thu, 04 Feb 2021 11:18:53 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39794) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7hLD-00039t-Ig; Thu, 04 Feb 2021 11:18:47 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2641 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l7hLC-0007dm-Ps; Thu, 04 Feb 2021 11:18:47 -0500 In-Reply-To: (message from Ioannis Kappas on Thu, 4 Feb 2021 07:36:23 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199305 Archived-At: > From: Ioannis Kappas > 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