summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2018-10-17 18:19:47 +0300
committerAndreas Schwab <schwab@linux-m68k.org>2019-06-10 12:52:31 +0200
commitfdd1b3e02097966e7ffe8065f6e3d27f5f540d0a (patch)
tree7163eaff57ea41c4a081bd2aff38845985d9a250 /test/src
parent758e9a8ed49c15f7069a67cf0c2ce3c6f9a3f7e1 (diff)
downloademacs-fdd1b3e02097966e7ffe8065f6e3d27f5f540d0a.tar.gz
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')
-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 e8d66b87db3..b57b4f9412d 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -347,4 +347,8 @@
(should (= (length (all-threads)) 1))
(should (equal (thread-last-error) '(error "Die, die, die!")))))
+(ert-deftest threads-test-bug33073 ()
+ (let ((th (make-thread 'ignore)))
+ (should-not (equal th main-thread))))
+
;;; threads.el ends here