aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorEli Zaretskii2016-12-21 22:16:24 +0200
committerEli Zaretskii2016-12-21 22:16:24 +0200
commit0a5b6e28f91ff46231a768737170e39172297257 (patch)
tree749d947d3e3a7fdefed2becd6a4303acb64e7fac /src/alloc.c
parenta6063ffe5ae395655cb55ba5823c83e306b3161b (diff)
downloademacs-0a5b6e28f91ff46231a768737170e39172297257.tar.gz
emacs-0a5b6e28f91ff46231a768737170e39172297257.zip
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.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c6
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)
6406 6406
6407#ifdef GC_CHECK_MARKED_OBJECTS 6407#ifdef GC_CHECK_MARKED_OBJECTS
6408 m = mem_find (po); 6408 m = mem_find (po);
6409 if (m == MEM_NIL && !SUBRP (obj)) 6409 if (m == MEM_NIL && !SUBRP (obj) && !THREADP (obj))
6410 emacs_abort (); 6410 emacs_abort ();
6411#endif /* GC_CHECK_MARKED_OBJECTS */ 6411#endif /* GC_CHECK_MARKED_OBJECTS */
6412 6412
@@ -6416,7 +6416,9 @@ mark_object (Lisp_Object arg)
6416 else 6416 else
6417 pvectype = PVEC_NORMAL_VECTOR; 6417 pvectype = PVEC_NORMAL_VECTOR;
6418 6418
6419 if (pvectype != PVEC_SUBR && pvectype != PVEC_BUFFER) 6419 if (pvectype != PVEC_SUBR
6420 && pvectype != PVEC_BUFFER
6421 && pvectype != PVEC_THREAD)
6420 CHECK_LIVE (live_vector_p); 6422 CHECK_LIVE (live_vector_p);
6421 6423
6422 switch (pvectype) 6424 switch (pvectype)