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#65796: dynamic module non_local_exit_get overwrites exit signals Date: Thu, 07 Sep 2023 10:07:33 +0300 Message-ID: <8334zq1mx6.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65796@debbugs.gnu.org To: Xinyang Chen , Philipp Stephani , Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 07 09:08:21 2023 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 1qe97k-0003E2-Sq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Sep 2023 09:08:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qe97U-0000gE-Uy; Thu, 07 Sep 2023 03:08:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qe97R-0000fo-2u for bug-gnu-emacs@gnu.org; Thu, 07 Sep 2023 03:08:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qe97Q-0007FP-PZ for bug-gnu-emacs@gnu.org; Thu, 07 Sep 2023 03:08:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qe97S-000647-8d for bug-gnu-emacs@gnu.org; Thu, 07 Sep 2023 03:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Sep 2023 07:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65796 X-GNU-PR-Package: emacs Original-Received: via spool by 65796-submit@debbugs.gnu.org id=B65796.169407047523302 (code B ref 65796); Thu, 07 Sep 2023 07:08:02 +0000 Original-Received: (at 65796) by debbugs.gnu.org; 7 Sep 2023 07:07:55 +0000 Original-Received: from localhost ([127.0.0.1]:38410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qe97K-00063m-TU for submit@debbugs.gnu.org; Thu, 07 Sep 2023 03:07:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qe97J-00063Z-IY for 65796@debbugs.gnu.org; Thu, 07 Sep 2023 03:07:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qe97C-0007EL-5X; Thu, 07 Sep 2023 03:07:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BK3rW+eT2Jcc9r6id1iYqQZrsy1nKvCwc5oabv7D6Mk=; b=i5IR9+5q4esT uNggmLyKlRBHB9n2SoCIwPEU4ZH97sRaJekh2m2LC09tC4x7AFNsBaAfRpjAf+YR0mtoO6m53ABYM KCK1VkpTbGsZsZtR2WymQX7vXZ8CYc24mB8+oJ7hqOyMQAkGRvbiPF9E5gBpyS+5B8I85bcKJo/v+ otQl9GTmh9RX3rml/pDJE+88LulAgS8uhu2eDvhLZZgF5ySRAq0RrTyKoiRTDUnaTx7QcIGDTgHTG 1vEucXlRGIJpl6BDKcCtlBUJpTUP7WMccpqTURtClwx56sYl61q3octcB4r6kVX4f07AgO16YBVTl 140SKbiFvq6mLvdPvBHztw==; In-Reply-To: (message from Xinyang Chen on Wed, 6 Sep 2023 18:52:14 -0400) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269610 Archived-At: > From: Xinyang Chen > Date: Wed, 6 Sep 2023 18:52:14 -0400 > > Currently `module_non_local_exit_get` returns pointers to fields > in emacs_env_private: > ``` > if (p->pending_non_local_exit != emacs_funcall_exit_return) > { > *symbol = &p->non_local_exit_symbol; > *data = &p->non_local_exit_data; > } > ``` > this means that if one tries to: > ``` > funcall(...); > non_local_exit_get(&s1, &d1); > funcall(...); > non_local_exit_get(&s2, &d2); > non_local_exit_signal(s1, d1); > ``` > you would signal the second error, instead of the first error (I expected > this to happen). > It seems to me that `module_non_local_exit_get` should > `allocate_emacs_value` instead. Philipp, Daniel: any comments? Btw, the non_local_exit_get function is currently not documented in the ELisp manual; should it be?