Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueTypes: java.lang.IdentityException MonitorEnterTest.java #20984

Open
a7ehuo opened this issue Jan 21, 2025 · 2 comments
Open

ValueTypes: java.lang.IdentityException MonitorEnterTest.java #20984

a7ehuo opened this issue Jan 21, 2025 · 2 comments
Assignees
Labels
comp:jit project:valhalla Used to track Project Valhalla related work

Comments

@a7ehuo
Copy link
Contributor

a7ehuo commented Jan 21, 2025

Failed Tests:

TEST: runtime/valhalla/inlinetypes/MonitorEnterTest.java#id0
TEST: runtime/valhalla/inlinetypes/MonitorEnterTest.java#id1
TEST: runtime/valhalla/inlinetypes/MonitorEnterTest.java#id2
STDERR:
java.lang.IdentityException: bad object type runtime/valhalla/inlinetypes/MonitorEnterTest$MyValue: object that is synchronized is a value type
        at runtime.valhalla.inlinetypes.MonitorEnterTest.monitorEnter(MonitorEnterTest.java:56)
        at runtime.valhalla.inlinetypes.MonitorEnterTest.main(MonitorEnterTest.java:75)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:571)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1458)

JavaTest Message: Test threw exception: java.lang.IdentityException: bad object type runtime/valhalla/inlinetypes/MonitorEnterTest$MyValue: object that is synchronized is a value type
JavaTest Message: shutting down test

This is likely a JIT issue since it doesn't happen with -Xint.

JVM version

openjdk version "25-internal" 2025-09-16
OpenJDK Runtime Environment (build 25-internal-adhoc.root.openj9-openjdk-jdk.valuetypes)
Eclipse OpenJ9 VM (build master-eb9322941f4-eb9322941, JRE 25 Linux amd64-64-Bit Compressed References 20250117_000000 (JIT enabled, AOT enabled)
OpenJ9   - eb9322941
OMR      - 2767da3a2
JCL      - c154841cc67 based on jdk-25+5)
@a7ehuo a7ehuo added comp:jit project:valhalla Used to track Project Valhalla related work labels Jan 21, 2025
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Jan 21, 2025

@hzongaro @hangshao0 @theresa-m fyi

This is likely a JIT issue since it doesn't happen with -Xint.

@hzongaro
Copy link
Member

I had prototyped a JIT change for this last year when we learned monitorenter could throw an IdentityException, but I never delivered it. I'll dust that off.

@hzongaro hzongaro self-assigned this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

No branches or pull requests

2 participants