Skip to content

Commit 6d97e15

Browse files
authored
Assert collection is enabled when GC starts (#279)
This PR adds an assertion to check if GC is always enabled when we stop threads for a GC. If we see this assertion fail, we will know it is related with #278.
1 parent 19d3933 commit 6d97e15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mmtk/src/collection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ impl Collection<JuliaVM> for VMCollection {
5959
// FIXME add wait var
6060
}
6161

62+
assert!(Self::is_collection_enabled(), "Collection is disabled when threads are stopped for a GC. This is a concurrency bug, see https://github.com/mmtk/mmtk-julia/issues/278.");
63+
6264
trace!("Stopped the world!");
6365
#[cfg(feature = "heap_dump")]
6466
dump_heap(GC_COUNT.load(Ordering::SeqCst), 0);

0 commit comments

Comments
 (0)