comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 4071:ed80554efa25

7106751: G1: gc/gctests/nativeGC03 crashes VM with SIGSEGV Summary: _cset_rs_update_cl[] was indexed with values beyond what it is set up to handle. Reviewed-by: ysr, jmasa, johnc
author brutisso
date Wed, 02 Nov 2011 08:04:23 +0100
parents c6a6e936dc68
children a88de71c4e3a
comparison
equal deleted inserted replaced
4070:6fd81579526f 4071:ed80554efa25
633 #if CARD_REPEAT_HISTO 633 #if CARD_REPEAT_HISTO
634 init_ct_freq_table(_g1->max_capacity()); 634 init_ct_freq_table(_g1->max_capacity());
635 ct_freq_note_card(_ct_bs->index_for(start)); 635 ct_freq_note_card(_ct_bs->index_for(start));
636 #endif 636 #endif
637 637
638 assert(!check_for_refs_into_cset || _cset_rs_update_cl[worker_i] != NULL, "sanity"); 638 OopsInHeapRegionClosure* oops_in_heap_closure = NULL;
639 if (check_for_refs_into_cset) {
640 // ConcurrentG1RefineThreads have worker numbers larger than what
641 // _cset_rs_update_cl[] is set up to handle. But those threads should
642 // only be active outside of a collection which means that when they
643 // reach here they should have check_for_refs_into_cset == false.
644 assert((size_t)worker_i < n_workers(), "index of worker larger than _cset_rs_update_cl[].length");
645 oops_in_heap_closure = _cset_rs_update_cl[worker_i];
646 }
639 UpdateRSOrPushRefOopClosure update_rs_oop_cl(_g1, 647 UpdateRSOrPushRefOopClosure update_rs_oop_cl(_g1,
640 _g1->g1_rem_set(), 648 _g1->g1_rem_set(),
641 _cset_rs_update_cl[worker_i], 649 oops_in_heap_closure,
642 check_for_refs_into_cset, 650 check_for_refs_into_cset,
643 worker_i); 651 worker_i);
644 update_rs_oop_cl.set_from(r); 652 update_rs_oop_cl.set_from(r);
645 653
646 TriggerClosure trigger_cl; 654 TriggerClosure trigger_cl;