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

Wed, 23 Oct 2013 20:20:03 +0400

author
vlivanov
date
Wed, 23 Oct 2013 20:20:03 +0400
changeset 6000
0d1661d63d70
parent 5999
d95eca175eff
child 6001
f7d928a3181c
child 6041
f01788f13696

8012941: JSR 292: too deep inlining might crash compiler because of stack overflow
Reviewed-by: kvn, twisti

src/share/vm/c1/c1_GraphBuilder.cpp file | annotate | diff | comparison | revisions
src/share/vm/c1/c1_globals.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Oct 23 20:15:24 2013 +0400
     1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Oct 23 20:20:03 2013 +0400
     1.3 @@ -3768,6 +3768,7 @@
     1.4  
     1.5    // now perform tests that are based on flag settings
     1.6    if (callee->force_inline()) {
     1.7 +    if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel");
     1.8      print_inlining(callee, "force inline by annotation");
     1.9    } else if (callee->should_inline()) {
    1.10      print_inlining(callee, "force inline by CompileOracle");
     2.1 --- a/src/share/vm/c1/c1_globals.hpp	Wed Oct 23 20:15:24 2013 +0400
     2.2 +++ b/src/share/vm/c1/c1_globals.hpp	Wed Oct 23 20:20:03 2013 +0400
     2.3 @@ -341,6 +341,8 @@
     2.4    diagnostic(bool, C1PatchInvokeDynamic, true,                              \
     2.5               "Patch invokedynamic appendix not known at compile time")      \
     2.6                                                                              \
     2.7 +  develop(intx, MaxForceInlineLevel, 100,                                   \
     2.8 +          "maximum number of nested @ForceInline calls that are inlined")   \
     2.9                                                                              \
    2.10  
    2.11  

mercurial