# HG changeset patch # User ehelin # Date 1421238845 -3600 # Wed Jan 14 13:34:05 2015 +0100 # Node ID 11742cffeb78b7cd2c56d382f887b8374367e0e1 # Parent acec9aeeaaeab9816811c7e45fb5042c84aa1f16 8068971: A heap region being cleared should not belong to the cset diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_implementation/g1/heapRegion.cpp --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -157,18 +157,18 @@ void HeapRegion::reset_after_compaction( init_top_at_mark_start(); } void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) { assert(_humongous_start_region == NULL, "we should have already filtered out humongous regions"); assert(_end == orig_end(), "we should have already filtered out humongous regions"); - - _in_collection_set = false; + assert(_in_collection_set == false, + "can't clear a heap region in the collection set"); set_allocation_context(AllocationContext::system()); set_young_index_in_cset(-1); uninstall_surv_rate_group(); set_free(); reset_pre_dummy_top(); if (!par) {