From ccd938ebb19db9f7181adb2faae49b43ea1bce5a Mon Sep 17 00:00:00 2001 From: Andy Chu Date: Thu, 7 Jan 2021 10:20:43 -0800 Subject: [PATCH] [gc_heap] Disable invariant check for now. This catches a legitimate bug. --- mycpp/gc_heap.cc | 2 +- mycpp/run.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mycpp/gc_heap.cc b/mycpp/gc_heap.cc index 292b9517cc..b45124827b 100644 --- a/mycpp/gc_heap.cc +++ b/mycpp/gc_heap.cc @@ -158,7 +158,7 @@ void Heap::Collect() { // This updates the underlying Str/List/Dict with a forwarding pointer, // i.e. for other objects that are pointing to it Obj* new_location = Relocate(root, header); -#if GC_DEBUG +#if TODO_BUG for (int j = 0; j < roots_top_; ++j) { Obj** handle2 = roots_[j]; auto root2 = *handle2; diff --git a/mycpp/run.sh b/mycpp/run.sh index 3a352a7a82..29d992d0de 100755 --- a/mycpp/run.sh +++ b/mycpp/run.sh @@ -205,9 +205,8 @@ cpp-compile() { local variant=$2 shift 2 - local flags='-D GC_DEBUG -D GC_PROTECT -D GC_EVERY_ALLOC ' - #local flags='-D GC_DEBUG -D GC_PROTECT ' - #local flags='-D GC_DEBUG ' + #local flags='-D GC_DEBUG -D GC_PROTECT -D GC_EVERY_ALLOC ' + local flags='-D GC_DEBUG -D GC_PROTECT ' case $variant in (asan) flags+="$CXXFLAGS $ASAN_FLAGS"