diff src/share/vm/memory/collectorPolicy.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 7a95933197d0
children 2958af1d8c5a
line wrap: on
line diff
--- a/src/share/vm/memory/collectorPolicy.cpp	Tue May 14 17:08:31 2013 +0200
+++ b/src/share/vm/memory/collectorPolicy.cpp	Wed May 15 11:05:09 2013 +0200
@@ -752,7 +752,7 @@
   // free memory should be here, especially if they are expensive. If this
   // attempt fails, an OOM exception will be thrown.
   {
-    IntFlagSetting flag_change(MarkSweepAlwaysCompactCount, 1); // Make sure the heap is fully compacted
+    UIntFlagSetting flag_change(MarkSweepAlwaysCompactCount, 1); // Make sure the heap is fully compacted
 
     gch->do_collection(true             /* full */,
                        true             /* clear_all_soft_refs */,