Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8028159

C2: compiler stack overflow during inlining of @ForceInline methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs25
    • hs25
    • hotspot
    • b59

        C2 may fail to delay inlining of @ForceInline methods. In case call sequence is deep enough, C2 can crash due to stack overflow.

        Test case:
        http://cr.openjdk.java.net/~vlivanov/8012941/webrev.00/raw_files/new/test/compiler/jsr292/DeepInliningTest.java

        Compilation output:
           6451 98 b DeepInliningTest::f (10 bytes)
                                    @ 3 java.lang.invoke.LambdaForm$MH/168423058::invokeExact_MT (13 bytes) inline (hot)
                                      @ 2 java.lang.invoke.Invokers::checkExactType (30 bytes) inline (hot)
                                        @ 11 java.lang.invoke.MethodHandle::type (5 bytes) accessor
                                      @ 9 java.lang.invoke.LambdaForm$MH/1450495309::convert (21 bytes) inline (hot)
                                        @ 5 java.lang.invoke.LambdaForm$MH/1670782018::convert (22 bytes) inline (hot)
                                          @ 5 java.lang.invoke.LambdaForm$MH/1706377736::convert (21 bytes) inline (hot)
                                            @ 5 java.lang.invoke.LambdaForm$MH/468121027::convert (22 bytes) inline (hot)
                                              @ 5 java.lang.invoke.LambdaForm$MH/1804094807::convert (21 bytes) inline (hot)
                                                @ 5 java.lang.invoke.LambdaForm$MH/951007336::convert (22 bytes) inline (hot)
                                                  @ 5 java.lang.invoke.LambdaForm$MH/2001049719::convert (21 bytes) inline (hot)
                                                    @ 5 java.lang.invoke.LambdaForm$MH/1528902577::convert (22 bytes) inline (hot)
        ...

        P3 = HLM (ILW)
        I = H: VM crash
        L = L: very narrow corner case
        W = M: increase maximum stack size for compiler threads

              vlivanov Vladimir Ivanov
              vlivanov Vladimir Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: