1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-28 07:50:48 -08:00
emacs/doc
Philipp Stephani 32da093e52 Don't overwrite non-local exit symbol and data (Bug#65796).
The previous approach would incorrectly invalidate the returned module
values if another non-local exit occurred while dealing with a non-local
exit.  See Bug#65796.  Instead, allocate the values from the usual
environment storage, and return statically-allocated objects if that
fails.

* src/emacs-module.c (struct emacs_env_private): Turn non-local exit
symbol and data into normal Lisp objects.
(initialize_environment): Initialize them.
(mark_module_environment): Prevent them from being garbage-collected.
(module_signal_or_throw, module_non_local_exit_signal_1)
(module_non_local_exit_throw_1): Adapt uses.
(value_to_lisp): No longer scan for them with module assertions enabled.
(module_out_of_memory_signal, module_out_of_memory_data): New
statically-allocated module values to return in case of allocation
failure.
(syms_of_module): Initialize them.
(module_non_local_exit_get): Allocate module values normally.  If that
fails, return statically-allocated values.

* doc/lispref/internals.texi (Module Nonlocal): Document new behavior.
2025-02-28 01:45:35 +01:00
..
emacs ; Fix typos 2025-02-22 14:48:29 +01:00
lispintro (lexical-binding): Allow changing the default value (bug#74145) 2025-02-18 15:37:50 -05:00
lispref Don't overwrite non-local exit symbol and data (Bug#65796). 2025-02-28 01:45:35 +01:00
man Update copyright year to 2025 2025-01-02 18:39:42 +01:00
misc Document :continue-only in use-package Info manual 2025-02-27 19:29:02 +02:00
translations Update copyright year to 2025 2025-01-02 18:39:42 +01:00