[lworld] Some tests in serviceability/jvmti/HeapMonitor/MyPackage/ fail after JDK-8379007

XMLWordPrintable

      The tests fail when run with --enable-preview

      FATAL ERROR in native method: Error in event_storage_add: Exception in jni NewWeakGlobalRef

      Adding some diagnostic info we see:

      Exception in thread "MainThread" java.lang.IdentityException: java.lang.Byte is not an identity class
      at java.base/java.lang.invoke.MemberName.hashCode(MemberName.java:735)
      at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:951)
      at java.base/java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:3986)
      at java.base/java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:606)
      at MyPackage.HeapMonitorVMEventsTest.compareSampledAndVM(HeapMonitorVMEventsTest.java:105)
      at MyPackage.HeapMonitorVMEventsTest.main(HeapMonitorVMEventsTest.java:122)

      So the test is now incompatible with preview mode because Byte (and perhaps others) is now a value class and so can't be weakly-referenced from the native code.

        There are no Sub-Tasks for this issue.

            Assignee:
            Alex Menkov
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: