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

JVM crashes when bootstrap method for condy triggers loading of class whose static initializer throws exception

XMLWordPrintable

    • b08
    • generic
    • generic

        Crash can be reproduced on following versions

        openjdk version "11.0.2" 2018-10-16
        OpenJDK Runtime Environment 18.9 (build 11.0.2+7)
        OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+7, mixed mode)

        openjdk version "13-ea" 2019-09-17
        OpenJDK Runtime Environment (build 13-ea+30)
        OpenJDK 64-Bit Server VM (build 13-ea+30, mixed mode, sharing)

        openjdk version "14-ea" 2020-03-17
        OpenJDK Runtime Environment (build 14-ea+6-171)
        OpenJDK 64-Bit Server VM (build 14-ea+6-171, mixed mode, sharing)

        using attached StaticInit.class and Example.class files

        java -cp . Example

        which were generated as following

        javac -cp asm-7.1.jar:asm-tree-7.1.jar --release 11 Generator.java StaticInit.java
        java -cp asm-7.1.jar:asm-tree-7.1.jar:. Generator

        No crash when class StaticInit is loaded before invocation of bootstrap method

        javac -cp . --release 11 ExampleNoCrash.java
        java -cp . ExampleNoCrash

          1. hs_err_pid24294.log
            70 kB
          2. Example.class
            0.4 kB
          3. StaticInit.class
            0.4 kB
          4. Generator.java
            2 kB
          5. StaticInit.java
            0.2 kB
          6. ExampleNoCrash.java
            0.2 kB

              coleenp Coleen Phillimore
              godin Evgeny Mandrikov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: