diff options
author | Philipp Stephani <phst@google.com> | 2020-07-25 23:04:05 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-07-25 23:04:05 +0200 |
commit | 6355a3ec62f43c9b99d483982ff851d32dd78891 (patch) | |
tree | 2a9896b373c7e713c8ec504a464d5401e8134ab8 /lisp/emacs-lisp | |
parent | 609cbd63c31a21ca521507695abeda1203134c99 (diff) | |
download | emacs-6355a3ec62f43c9b99d483982ff851d32dd78891.tar.gz emacs-6355a3ec62f43c9b99d483982ff851d32dd78891.tar.bz2 emacs-6355a3ec62f43c9b99d483982ff851d32dd78891.zip |
Fix subtle bug when checking liveness of module values.
We can't simply look up the Lisp object in the global reference table
because an invalid local and a valid global reference might refer to
the same object. Instead, we have to test the address of the global
reference against the stored references.
* src/emacs-module.c (module_global_reference_p): New helper function.
(value_to_lisp): Use it.
* test/data/emacs-module/mod-test.c
(Fmod_test_invalid_store_copy): New test module function.
(emacs_module_init): Export it.
* test/src/emacs-module-tests.el
(module--test-assertions--load-non-live-object-with-global-copy):
New unit test.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions