aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
authorAndreas Schwab2019-06-10 12:34:38 +0200
committerAndreas Schwab2019-06-10 12:35:35 +0200
commit1877b7b4d79b3434379fd5a4abd85906c25df00c (patch)
tree639da77892522407559cd9133c44339f0b6fb783 /src/thread.c
parent4904fb352c14539e1c6927e8c893abb037bca8a0 (diff)
downloademacs-1877b7b4d79b3434379fd5a4abd85906c25df00c.tar.gz
emacs-1877b7b4d79b3434379fd5a4abd85906c25df00c.zip
Don't mark main_thread (Bug#36155)
* thread.c (mark_threads_callback): Don't mark main_thread.
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c
index 0cd1ae33dc2..e2158019839 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -645,7 +645,10 @@ mark_threads_callback (void *ignore)
645 Lisp_Object thread_obj; 645 Lisp_Object thread_obj;
646 646
647 XSETTHREAD (thread_obj, iter); 647 XSETTHREAD (thread_obj, iter);
648 mark_object (thread_obj); 648 /* Don't mark main_thread, since it is not allocated
649 dynamically, thus nothing would unmark it. */
650 if (iter != &main_thread)
651 mark_object (thread_obj);
649 mark_one_thread (iter); 652 mark_one_thread (iter);
650 } 653 }
651} 654}