aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/thread-tests.el
diff options
context:
space:
mode:
authorEli Zaretskii2018-10-17 18:19:47 +0300
committerEli Zaretskii2018-10-17 18:19:47 +0300
commit73567432329a245b2eb02e4c61adea2c8eab6b3a (patch)
tree2dbdfc862dc4b4dbea44b2f613720c50915406cc /test/src/thread-tests.el
parent134ba45bf0c11048c44a46c11d5dc8da12ca4d3e (diff)
downloademacs-73567432329a245b2eb02e4c61adea2c8eab6b3a.tar.gz
emacs-73567432329a245b2eb02e4c61adea2c8eab6b3a.zip
Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function. * src/lisp.h (unmark_main_thread): Prototype it. * src/alloc.c (garbage_collect_1): Call it after sweeping. (Bug#33073) * test/src/thread-tests.el (threads-test-bug33073): New test.
Diffstat (limited to 'test/src/thread-tests.el')
-rw-r--r--test/src/thread-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el
index 109e71128ab..36bb6377901 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -388,4 +388,8 @@
388 (should (= (length (all-threads)) 1)) 388 (should (= (length (all-threads)) 1))
389 (should (equal (thread-last-error) '(error "Die, die, die!"))))) 389 (should (equal (thread-last-error) '(error "Die, die, die!")))))
390 390
391(ert-deftest threads-test-bug33073 ()
392 (let ((th (make-thread 'ignore)))
393 (should-not (equal th main-thread))))
394
391;;; threads.el ends here 395;;; threads.el ends here