Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.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 | 2f50bc369470 |
children | eba99d16dc6f |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Tue May 14 17:08:31 2013 +0200 +++ b/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Wed May 15 11:05:09 2013 +0200 @@ -92,8 +92,8 @@ const bool clear_all_soft_refs = heap->collector_policy()->should_clear_all_soft_refs(); - int count = (maximum_heap_compaction)?1:MarkSweepAlwaysCompactCount; - IntFlagSetting flag_setting(MarkSweepAlwaysCompactCount, count); + uint count = maximum_heap_compaction ? 1 : MarkSweepAlwaysCompactCount; + UIntFlagSetting flag_setting(MarkSweepAlwaysCompactCount, count); PSMarkSweep::invoke_no_policy(clear_all_soft_refs || maximum_heap_compaction); }