]> code.delx.au - gnu-emacs/commitdiff
Fix bug in GC_CHECK_MARKED_OBJECTS check
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Oct 2015 20:33:50 +0000 (13:33 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Oct 2015 20:34:18 +0000 (13:34 -0700)
* src/alloc.c (mark_object): Fix bug in checking code.
When GC_CHECK_MARKED_OBJECTS is defined, the bug caused
CHECK_ALLOCATED_AND_LIVE_SYMBOL to repeatedly do the
CHECK_ALLOCATED and CHECK_LIVE tests for the first symbol in each
bucket.  The bug did not affect behavior either in the normal case
where GC_CHECK_MARKED_OBJECTS is not defined, or where Emacs does
not have an internal error that a properly-written
CHECK_ALLOCATED_AND_LIVE_SYMBOL would detect.

src/alloc.c

index 3ab2a6e3843b0c4a6180e2d964c48e42175c2318..5fc40d13b8df75e971565091bc26dc65c7e6e79d 100644 (file)
@@ -6217,7 +6217,7 @@ mark_object (Lisp_Object arg)
          MARK_STRING (XSTRING (ptr->name));
        MARK_INTERVAL_TREE (string_intervals (ptr->name));
        /* Inner loop to mark next symbol in this bucket, if any.  */
-       ptr = ptr->next;
+       po = ptr = ptr->next;
        if (ptr)
          goto nextsym;
       }