emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0a5b6e2: Fix aborts in GC under GC_CHECK_MARKED_OBJ


From: Eli Zaretskii
Subject: [Emacs-diffs] master 0a5b6e2: Fix aborts in GC under GC_CHECK_MARKED_OBJECTS
Date: Wed, 21 Dec 2016 20:18:13 +0000 (UTC)

branch: master
commit 0a5b6e28f91ff46231a768737170e39172297257
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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
    <address@hidden> in
    http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html.
---
 src/alloc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index f2b7682..e979f36 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]