diff options
author | vlivanov <none@none> | 2013-10-23 20:20:03 +0400 |
---|---|---|
committer | vlivanov <none@none> | 2013-10-23 20:20:03 +0400 |
commit | e64976b9bee2b2c8333222b6060fb5f922553200 (patch) | |
tree | c5722c322b4371f7b35e0a2a4f37f97edb380984 /src/share/vm/c1 | |
parent | a1a4f7f4dbb786908f68cc3f9e14af34f6a512df (diff) |
8012941: JSR 292: too deep inlining might crash compiler because of stack overflow
Reviewed-by: kvn, twisti
--HG--
extra : rebase_source : f89a04b1424181bd5104785a1170df4b9e87097c
Diffstat (limited to 'src/share/vm/c1')
-rw-r--r-- | src/share/vm/c1/c1_GraphBuilder.cpp | 1 | ||||
-rw-r--r-- | src/share/vm/c1/c1_globals.hpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/share/vm/c1/c1_GraphBuilder.cpp b/src/share/vm/c1/c1_GraphBuilder.cpp index 2ac2cceed..75e827b3b 100644 --- a/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/src/share/vm/c1/c1_GraphBuilder.cpp @@ -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"); diff --git a/src/share/vm/c1/c1_globals.hpp b/src/share/vm/c1/c1_globals.hpp index 3dceebc9d..9cc51ede6 100644 --- a/src/share/vm/c1/c1_globals.hpp +++ b/src/share/vm/c1/c1_globals.hpp @@ -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") \ \ |