]> git.eshelyaron.com Git - emacs.git/commit
Make checking for liveness of global values more precise.
authorPhilipp Stephani <phst@google.com>
Sat, 25 Jul 2020 21:23:19 +0000 (23:23 +0200)
committerPhilipp Stephani <phst@google.com>
Sat, 25 Jul 2020 21:23:19 +0000 (23:23 +0200)
commit9f01ce6327af886f26399924a9aadf16cdd4fd9f
treea363d2673c61ac60183457965462b05b8b867f4b
parent6355a3ec62f43c9b99d483982ff851d32dd78891
Make checking for liveness of global values more precise.

We can't just use a hash lookup because a global and a local reference
might refer to the same Lisp object.

* src/emacs-module.c (module_free_global_ref): More precise check for
global liveness.

* test/data/emacs-module/mod-test.c (Fmod_test_globref_invalid_free):
New test module function.
(emacs_module_init): Export it.

* test/src/emacs-module-tests.el
(module--test-assertions--globref-invalid-free): New unit test.
src/emacs-module.c
test/data/emacs-module/mod-test.c
test/src/emacs-module-tests.el