unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65796: dynamic module non_local_exit_get overwrites exit signals
@ 2023-09-06 22:52 Xinyang Chen
  2023-09-07  7:07 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Xinyang Chen @ 2023-09-06 22:52 UTC (permalink / raw)
  To: 65796

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

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.

-Alan

[-- Attachment #2: Type: text/html, Size: 855 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-07 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).