comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 10287:12f651e29f6b

6843347: Boundary values in some public GC options cause crashes Summary: Setting some public integer options to specific values causes crashes or undefined GC behavior. This patchset adds the necessary argument checking for these options. Reviewed-by: jmasa, brutisso
author tschatzl
date Wed, 15 May 2013 11:05:09 +0200
parents 06ab37f08701
children 7c5a1b62f53d
comparison
equal deleted inserted replaced
10286:0a2986f36965 10287:12f651e29f6b
690 } 690 }
691 691
692 _cmsGen ->init_initiating_occupancy(CMSInitiatingOccupancyFraction, CMSTriggerRatio); 692 _cmsGen ->init_initiating_occupancy(CMSInitiatingOccupancyFraction, CMSTriggerRatio);
693 693
694 // Clip CMSBootstrapOccupancy between 0 and 100. 694 // Clip CMSBootstrapOccupancy between 0 and 100.
695 _bootstrap_occupancy = ((double)MIN2((uintx)100, MAX2((uintx)0, CMSBootstrapOccupancy))) 695 _bootstrap_occupancy = ((double)CMSBootstrapOccupancy)/(double)100;
696 /(double)100;
697 696
698 _full_gcs_since_conc_gc = 0; 697 _full_gcs_since_conc_gc = 0;
699 698
700 // Now tell CMS generations the identity of their collector 699 // Now tell CMS generations the identity of their collector
701 ConcurrentMarkSweepGeneration::set_collector(this); 700 ConcurrentMarkSweepGeneration::set_collector(this);