6841800: Incorrect boundary values behavior for option -XX:MaxLabelRootDepth=0-6 leads to jvm crash
authorkvn
Wed, 24 Jun 2009 12:00:51 -0700
changeset 3176 2a5f513df340
parent 3175 333736275947
child 3177 f467776fc753
6841800: Incorrect boundary values behavior for option -XX:MaxLabelRootDepth=0-6 leads to jvm crash Summary: MaxLabelRootDepth value less then 10 is invalid. Reviewed-by: never
hotspot/src/share/vm/opto/matcher.cpp
--- a/hotspot/src/share/vm/opto/matcher.cpp	Wed Jun 24 02:09:45 2009 -0700
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Wed Jun 24 12:00:51 2009 -0700
@@ -141,6 +141,10 @@
 
 //---------------------------match---------------------------------------------
 void Matcher::match( ) {
+  if( MaxLabelRootDepth < 100 ) { // Too small?
+    assert(false, "invalid MaxLabelRootDepth, increase it to 100 minimum");
+    MaxLabelRootDepth = 100;
+  }
   // One-time initialization of some register masks.
   init_spill_mask( C->root()->in(1) );
   _return_addr_mask = return_addr();