# HG changeset patch # User kvn # Date 1245870051 25200 # Node ID 14367225a853ba52c7f6df78316715cde0e77823 # Parent e306d7c7222c1fe7c83fa04b51e24e1b9a4deb51 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 diff -r e306d7c7222c -r 14367225a853 src/share/vm/opto/matcher.cpp --- 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();