Skip to content

Commit 1877b7b

Browse files
Don't mark main_thread (Bug#36155)
* thread.c (mark_threads_callback): Don't mark main_thread.
1 parent 4904fb3 commit 1877b7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/thread.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,10 @@ mark_threads_callback (void *ignore)
645645
Lisp_Object thread_obj;
646646

647647
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);
649652
mark_one_thread (iter);
650653
}
651654
}

0 commit comments

Comments
 (0)