-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P3
-
Affects Version/s: repo-valhalla
-
Component/s: hotspot
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.
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.
- caused by
-
JDK-8379007 [lworld] JNI NewWeakGlobalRef should throw IdentityException for value types
-
- Closed
-