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
--- 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();