8012941: JSR 292: too deep inlining might crash compiler because of stack overflow

Reviewed-by: kvn, twisti
This commit is contained in:
Vladimir Ivanov 2013-10-23 20:20:03 +04:00
parent 3375e14588
commit cb5592b08e
2 changed files with 3 additions and 0 deletions

View file

@ -3768,6 +3768,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, Bytecode
// now perform tests that are based on flag settings
if (callee->force_inline()) {
if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel");
print_inlining(callee, "force inline by annotation");
} else if (callee->should_inline()) {
print_inlining(callee, "force inline by CompileOracle");

View file

@ -341,6 +341,8 @@
diagnostic(bool, C1PatchInvokeDynamic, true, \
"Patch invokedynamic appendix not known at compile time") \
\
develop(intx, MaxForceInlineLevel, 100, \
"maximum number of nested @ForceInline calls that are inlined") \
\