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

[JVMCI] HotSpotResolvedJavaFieldImpl.isStable() does not work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • hotspot
    • b112
    • generic
    • generic
    • Verified

      There is a problem when executing a method "jdk.vm.ci.hotspot.HotSpotResolvedJavaFieldImpl::isStable()"

      The javadoc of the method says: "Checks if this field has the {@link Stable} annotation" and "@return true if field has {@link Stable} annotation, false otherwise".

      But I have a test (see attachment "StableFieldTest.java") that shows that even a field has @Stable annotation, "isStable" returns "false".

      To run the test, just compile it with Javac with latest JDK 9 build, the run it with options:

      $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbootclasspath/a:$DIR_WITH_TEST_CLASS -Xcomp -ea -esa

      Where DIR_WITH_TEST_CLASS is the directory containing compiled StableFieldTest.class.

            dnsimon Douglas Simon
            kshefov Konstantin Shefov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: