diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-12-21 22:16:24 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-12-21 22:16:24 +0200 |
commit | 0a5b6e28f91ff46231a768737170e39172297257 (patch) | |
tree | 749d947d3e3a7fdefed2becd6a4303acb64e7fac | |
parent | a6063ffe5ae395655cb55ba5823c83e306b3161b (diff) | |
download | emacs-0a5b6e28f91ff46231a768737170e39172297257.tar.gz |
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.
-rw-r--r-- | src/alloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index f2b7682b05d..e979f3631ee 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -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) |