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

C1: invokedynamic call patching violates JVMS-6.5.invokedynamic

XMLWordPrintable

    • b105
    • generic
    • generic
    • Verified

      The following JCK-runtime-9 b23 tests fail intermittently when run in "-Xcomp" mode:
      vm/instr/invokedynamic/invokedynamic010/invokedynamic01001m1
      vm/instr/invokedynamic/invokedynamic010/invokedynamic01001m2
      vm/instr/invokedynamic/invokedynamic010/invokedynamic01001m3

      These test were introduced only in JCK-runtime-9 b23, they are absent in b22.

      The tests verify the following part of the spec:
      "If several threads simultaneously execute the bootstrap method for the same dynamic call site, the Java Virtual Machine must choose one returned call site object and install it visibly to all threads. Any other bootstrap methods executing for the dynamic call site are allowed to complete, but their results are ignored, and the threads' execution of the dynamic call site proceeds with the chosen call site object. [jvms-6.5.invokedynamic.desc-240]"

      The specification above applies to both JDK 8 and JDK 9, but we have JCK tests only for JDK 9.

      The tests fail intermittently when run in "-Xcomp" mode for JDK 8 FCS b132, JDK 8u51 b16, JDK 9 b73, JDK 9 b85, JDK 9 b88 (only tested builds are named here).

      Looks like the spec is violated in "-Xcomp" mode for both JDK 9 and JDK 8u.

      Issue is reproduced intermittently (in 50% to 60% cases) on all platforms if run in "-Xcomp".

      The tests always pass if run without "-Xcomp" option.

            vlivanov Vladimir Ivanov
            kshefov Konstantin Shefov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: