diff --git a/runtime/src/main/cpp/Memory.cpp b/runtime/src/main/cpp/Memory.cpp index bda7951ed41..c05904354fa 100644 --- a/runtime/src/main/cpp/Memory.cpp +++ b/runtime/src/main/cpp/Memory.cpp @@ -754,7 +754,7 @@ void ScanBlack(ContainerHeader* start) { if (color == CONTAINER_TAG_GC_GREEN || color == CONTAINER_TAG_GC_BLACK) continue; container->setColorAssertIfGreen(CONTAINER_TAG_GC_BLACK); } else { - if (container->marked()) continue; + if (!container->marked()) continue; container->unMark(); } traverseContainerReferredObjects(container, [&toVisit](ObjHeader* ref) {