From: Andreas Schwab Date: Mon, 10 Jun 2019 10:34:38 +0000 (+0200) Subject: Don't mark main_thread (Bug#36155) X-Git-Tag: emacs-26.2.90~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1877b7b;p=emacs.git Don't mark main_thread (Bug#36155) * thread.c (mark_threads_callback): Don't mark main_thread. --- 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) Lisp_Object thread_obj; XSETTHREAD (thread_obj, iter); - mark_object (thread_obj); + /* Don't mark main_thread, since it is not allocated + dynamically, thus nothing would unmark it. */ + if (iter != &main_thread) + mark_object (thread_obj); mark_one_thread (iter); } }