From: Eli Zaretskii <eliz@gnu.org>
To: Xinyang Chen <chenxinyang99@gmail.com>,
Philipp Stephani <phst@google.com>,
Daniel Colascione <dancol@dancol.org>
Cc: 65796@debbugs.gnu.org
Subject: bug#65796: dynamic module non_local_exit_get overwrites exit signals
Date: Thu, 07 Sep 2023 10:07:33 +0300 [thread overview]
Message-ID: <8334zq1mx6.fsf@gnu.org> (raw)
In-Reply-To: <CANnQ9XZWvWTzcSvh+wVbTygOHtL4oYT9JZmBYK1SGSO9FCHaNQ@mail.gmail.com> (message from Xinyang Chen on Wed, 6 Sep 2023 18:52:14 -0400)
> From: Xinyang Chen <chenxinyang99@gmail.com>
> 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?
next prev parent reply other threads:[~2023-09-07 7:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 22:52 bug#65796: dynamic module non_local_exit_get overwrites exit signals Xinyang Chen
2023-09-07 7:07 ` Eli Zaretskii [this message]
2023-09-07 10:24 ` Philipp Stephani via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-07 10:55 ` 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=8334zq1mx6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65796@debbugs.gnu.org \
--cc=chenxinyang99@gmail.com \
--cc=dancol@dancol.org \
--cc=phst@google.com \
/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).