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

condy causes JVM crash

    XMLWordPrintable

Details

    • b06
    • generic
    • generic

    Backports

      Description

        I tried to utilize https://openjdk.java.net/jeps/309 in JaCoCo project and discovered that this quite stably causes crash of JVM.

        JaCoCo performs instrumentation of bytecode to record code coverage.
        After https://github.com/Godin/jacoco/commit/09e1325ababb6859aa09b11a788ffb7aa5eb86a6
        it will use condy to store probe array. For example instrumentation of

        class Example {
          private Example() {
          }

          public static void main(String[] args) {
            System.out.println("Hello, World!");
          }
        }

        will look as following:

        class Example {
          private Example() {
            boolean[] probes = // LDC
            probes[0] = true;
          }

          public static void main(String[] args) {
            boolean[] probes = // LDC
            System.out.println("Hello, World!");
            probes[1] = true;
          }

          // BSM:
          private static boolean[] $jacocoInit(MethodHandles.Lookup lookup, String name, Class cls);
        }

        Don't know how to create reduced example, however this can be reproduced as following:

        git clone https://github.com/Godin/jacoco --single-branch --branch=condy_jvm_crash && cd jacoco
        mvn clean package -Dmaven.javadoc.skip -Dbytecode.version=11

        Attachments

          1. hs_err_pid31992.log
            75 kB
          2. hs_err_pid32480.log
            75 kB
          3. replay_pid31992.log
            269 kB
          4. replay_pid32480.log
            259 kB

          Issue Links

            Activity

              People

                lfoltan Lois Foltan
                godin Evgeny Mandrikov
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: