Fix aborts in GC under GC_CHECK_MARKED_OBJECTS

* src/alloc.c (mark_object) [GC_CHECK_MARKED_OBJECTS]: Don't abort
for thread objects.  They are marked via the all_threads list, and
therefore don't need to be inserted into the red-black tree, so
mem_find will never find them.  Reported by Daniel Colascione
<dancol@dancol.org> in
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html.
This commit is contained in:
Eli Zaretskii 2016-12-21 22:16:24 +02:00
parent a6063ffe5a
commit 0a5b6e28f9

View file

@ -6406,7 +6406,7 @@ mark_object (Lisp_Object arg)
#ifdef GC_CHECK_MARKED_OBJECTS
m = mem_find (po);
if (m == MEM_NIL && !SUBRP (obj))
if (m == MEM_NIL && !SUBRP (obj) && !THREADP (obj))
emacs_abort ();
#endif /* GC_CHECK_MARKED_OBJECTS */
@ -6416,7 +6416,9 @@ mark_object (Lisp_Object arg)
else
pvectype = PVEC_NORMAL_VECTOR;
if (pvectype != PVEC_SUBR && pvectype != PVEC_BUFFER)
if (pvectype != PVEC_SUBR
&& pvectype != PVEC_BUFFER
&& pvectype != PVEC_THREAD)
CHECK_LIVE (live_vector_p);
switch (pvectype)