changeset 872:14367225a853

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
author kvn
date Wed, 24 Jun 2009 12:00:51 -0700
parents e306d7c7222c
children 18a08a7e16b5
files src/share/vm/opto/matcher.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/matcher.cpp	Wed Jun 24 02:09:45 2009 -0700
+++ b/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();