Changeset 34dcc474 for src/Common/GC.cc


Ignore:
Timestamp:
Apr 11, 2018, 4:24:06 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
09a1ae6
Parents:
9f2012f
Message:

Fix one GC tracing bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/GC.cc

    r9f2012f r34dcc474  
    2222#include <algorithm>
    2323#include <cassert>
     24
     25// #include <csignal>
    2426
    2527GC& GC::get() {
     
    5557
    5658void GC::register_object(GC_Object* obj) {
     59        // if ( obj == (GC_Object*)0x60f00000e410ul ) std::raise( SIGTRAP );
    5760        (using_young ? young : old).push_back(obj);
    58         obj->mark = this->mark;
     61        obj->mark = ! this->mark;  // initialize as un-marked
    5962}
    6063
     
    105108        for ( GC_Object*& obj : old ) {
    106109                if ( obj->mark != mark ) {
     110                        // if ( obj == (GC_Object*)0x60f00000e410ul ) std::raise( SIGTRAP );
    107111                        delete obj;
    108112                        obj = nullptr;
Note: See TracChangeset for help on using the changeset viewer.