diff -r 45a0e81d43b7 -r a17a8a4b7e5c hotspot/src/share/vm/opto/matcher.cpp --- a/hotspot/src/share/vm/opto/matcher.cpp Fri Jun 14 07:27:22 2013 -0700 +++ b/hotspot/src/share/vm/opto/matcher.cpp Fri Jun 14 16:33:34 2013 -0700 @@ -985,6 +985,8 @@ mstack.push(n, Visit, NULL, -1); // set NULL as parent to indicate root while (mstack.is_nonempty()) { + C->check_node_count(NodeLimitFudgeFactor, "too many nodes matching instructions"); + if (C->failing()) return NULL; n = mstack.node(); // Leave node on stack Node_State nstate = mstack.state(); if (nstate == Visit) {