Skip to content

Commit

Permalink
[gc_heap] Disable invariant check for now.
Browse files Browse the repository at this point in the history
This catches a legitimate bug.
  • Loading branch information
Andy Chu committed Jan 7, 2021
1 parent 97941ec commit ccd938e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mycpp/gc_heap.cc
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions mycpp/run.sh
Expand Up @@ -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"
Expand Down

0 comments on commit ccd938e

Please sign in to comment.