1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 21:50:37 -08:00
emacs/test/src
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
..
regex-resources
alloc-tests.el Deprecate copy-record in favor of copy-sequence 2017-04-07 18:54:40 -07:00
buffer-tests.el
callproc-tests.el
casefiddle-tests.el Implement special sigma casing rule (bug#24603) 2017-04-06 20:54:58 +02:00
charset-tests.el Compare and round more carefully 2017-03-04 23:18:39 -08:00
chartab-tests.el
cmds-tests.el
coding-tests.el
data-tests.el Quieten compilation of some test files 2017-05-31 21:17:28 -04:00
decompress-tests.el
doc-tests.el
editfns-tests.el Add command to replace buffer contents 2017-06-17 15:40:58 +02:00
emacs-module-tests.el Module assertions: check for garbage collections 2017-07-08 15:25:01 +02:00
eval-tests.el Don't require bytecomp for running ert tests 2017-04-22 23:17:59 -04:00
floatfns-tests.el ffloor etc. now accept only floats 2017-03-05 13:31:33 -08:00
fns-tests.el * test/src/fns-tests.el, test/src/data-tests.el: Don't use cl 2017-05-23 08:39:20 -04:00
font-tests.el
inotify-tests.el Some inotify cleanup 2017-03-30 11:08:42 -07:00
keymap-tests.el
lread-tests.el Make `old-style-backquotes' variable internal 2017-05-13 12:32:29 +02:00
marker-tests.el
minibuf-tests.el
print-tests.el
process-tests.el
regex-tests.el Quieten compilation of some test files 2017-05-31 21:17:28 -04:00
syntax-tests.el Fix comment detection on open parens 2017-01-23 19:28:30 -05:00
textprop-tests.el
thread-tests.el Rudimentary error handling for non-main threads 2017-01-18 18:00:16 +02:00
undo-tests.el Add test for the fix in the parent commit 2017-06-17 03:55:49 +03:00
xml-tests.el