1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 18:21:19 -08:00
emacs/test/data
Philipp Stephani b7dab24b79 Module assertions: check for garbage collections
It's technically possible to write a user pointer finalizer that calls
into Emacs module functions.  This would be disastrous because it
would allow arbitrary Lisp code to run during garbage collection.
Therefore extend the module assertions to check for this case.

* src/emacs-module.c (module_assert_thread): Also check whether a
garbage collection is in progress.

* test/data/emacs-module/mod-test.c (invalid_finalizer)
(Fmod_test_invalid_finalizer): New test module functions.
(emacs_module_init): Register new test function.

* test/src/emacs-module-tests.el (module--test-assertion)
(module--with-temp-directory): New helper macros.
(module--test-assertions--load-non-live-object): Rename existing
unit test, use helper macros.
(module--test-assertions--call-emacs-from-gc): New unit test.
2017-07-08 15:25:01 +02:00
..
decompress
emacs-module Module assertions: check for garbage collections 2017-07-08 15:25:01 +02:00
epg
image
net
shr
xref
files-bug18141.el.gz
somelib.el Put re-loaded file back at start of load-history (bug#26837) 2017-05-09 19:44:09 -04:00
somelib2.el Put re-loaded file back at start of load-history (bug#26837) 2017-05-09 19:44:09 -04:00