From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ioannis Kappas 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, 4 Feb 2021 18:12:06 +0000 Message-ID: <8DC0758D-7497-4E96-B02C-7DADE1D26A24@gmail.com> References: <83h7mrrel4.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46284@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 04 19:54:45 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 1l7jm9-0004YK-8l for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Feb 2021 19:54:45 +0100 Original-Received: from localhost ([::1]:38080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7jm8-0001B1-4G for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Feb 2021 13:54:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7j7m-0006S8-19 for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 13:13:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7j7l-0003SX-QL for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 13:13:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7j7l-0006mT-Lg for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2021 13:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ioannis Kappas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2021 18:13:01 +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.161246234226012 (code B ref 46284); Thu, 04 Feb 2021 18:13:01 +0000 Original-Received: (at 46284) by debbugs.gnu.org; 4 Feb 2021 18:12:22 +0000 Original-Received: from localhost ([127.0.0.1]:42200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7j74-0006lP-IG for submit@debbugs.gnu.org; Thu, 04 Feb 2021 13:12:21 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:40458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7j71-0006l8-9h for 46284@debbugs.gnu.org; Thu, 04 Feb 2021 13:12:17 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id c12so4636022wrc.7 for <46284@debbugs.gnu.org>; Thu, 04 Feb 2021 10:12:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wKQaLNozt/hPDT/5hjlibI3InzzYL3DBNNa7fYnTqYQ=; b=SrejXLIqsWfjCKKEkY5SC0xR40F2VH2jcNXaaFoqNbPQXE//txK243taAHS3oh/xqe 5BprDoVwz5UM/TdvRfWRbK86OtWDKwLyspSeYO6dZ14UJ7+Bv/zgESac88noWReanOm7 NwoAZEToAuezvCfVCnHEo7byb88qx6K1TA/etod2951sial04eY67RASicokd2qebgMT TyRA/2vgviowiKU2wcISTDB+zvWJ0GesZUihBitsXkUXZRzLZRlCY5KoB6eTekEA+qbc 49iS8ITZKqnYOmN7Jwa5lKGKS0uLih5FX/v3FpYfr1b8VgTTUbblYCLqKsm/5pyilPeF P3WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wKQaLNozt/hPDT/5hjlibI3InzzYL3DBNNa7fYnTqYQ=; b=CgT+H2W/sz1tD+soEAdXjH6V4guLlDHVUDT+1/NgRO3rfdyp4utZPMyLsEsBWFESoZ lyjk66c9h4GVnIbuEpmfKkXIeMUqkxc+G8tfDIVPV6ktgDt3by4wXRnVhEgoQlwCvx1S EU63o0Rh0XvNF9LkZqoI+SBlXA80jQ8MgFb4ULQBQiQNmFUZNaywTO2Ap+FdQWeaGRVg EcKWpvuov2CmIqHnvVDEhS04+kpmmtuiH3xVDeNpc54yI2UBA5zHWqGsQ0YZUdb3yxZh gnb2yU9NUHYVchbJLJj6tP8Z6rRhVLbndoO3eiFct15ypWvoIs5qt5jLyqGqVVO0MvjZ HpnA== X-Gm-Message-State: AOAM5325DPqOCKaDP66ZTgj31NNei/mvISleDe8S06INmqYZAOMfAt8a SF+wbSK8QEXVgaDVOmzju48= X-Google-Smtp-Source: ABdhPJz2eq08Yqm6kx8aLA19QTxNTLPKQwxzPlNsZU11U2N3qaBzUicEi+8A+e5zoAOHf2l0KwB2QQ== X-Received: by 2002:adf:e381:: with SMTP id e1mr677840wrm.22.1612462329401; Thu, 04 Feb 2021 10:12:09 -0800 (PST) Original-Received: from 192.168.1.103 ([188.214.14.133]) by smtp.gmail.com with ESMTPSA id i7sm9168305wru.49.2021.02.04.10.12.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2021 10:12:08 -0800 (PST) In-Reply-To: <83h7mrrel4.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.40.0.2.32) 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:199322 Archived-At: Looks good, passes on both the original ert test case I=E2=80=99ve = attached to the bug report and the particular case I=E2=80=99ve = encountered the issue on (bringing down a REPL with cider). > On 4 Feb 2021, at 16:18, Eli Zaretskii wrote: >=20 >> From: Ioannis Kappas >> Date: Thu, 4 Feb 2021 07:36:23 +0000 >>=20 >> It appears as if the underlying signal number to description = conversion >> method is broken in emacs-27 on windows-nt causing the regression. >>=20 >> 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. >>=20 >> 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. >>=20 >> 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(): >=20 > 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? >=20 > 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 >=20 > #if !HAVE_DECL_SYS_SIGLIST && !defined _sys_siglist > - if (! initialized) > + if (! initialized > + || dumped_with_pdumper_p ()) > { > sys_siglist[SIGABRT] =3D "Aborted"; > # ifdef SIGAIO