JDK-8335256 : [lworld] C2: Remove larval InlineTypeNode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-06-27
  • Updated: 2025-05-12
  • Resolved: 2025-05-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
While testing JDK-8334546 I've noticed that compiler/valhalla/inlinetypes/TestValueConstruction.java fails intermittently (8 out of 300 runs).

The following additional VM flags are required:
-XX:Tier0BackedgeNotifyFreqLog=0 -XX:Tier2BackedgeNotifyFreqLog=0 -XX:Tier3BackedgeNotifyFreqLog=0 -XX:Tier2BackEdgeThreshold=1 -XX:Tier3BackEdgeThreshold=1 -XX:Tier4BackEdgeThreshold=1 -Xbatch

Output:
java.lang.RuntimeException: assertEquals: expected x: 1, y: 0 to equal x: 1, y: 1
	at jdk.test.lib.Asserts.fail(Asserts.java:634)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:189)
	at jdk.test.lib.Asserts.assertEQ(Asserts.java:166)
	at compiler.valhalla.inlinetypes.TestValueConstruction.main(TestValueConstruction.java:618)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)

See TODO 8335256 in the code.
Comments
A pull request was submitted for review. Branch: lworld URL: https://git.openjdk.org/valhalla/pull/1447 Date: 2025-04-27 13:17:10 +0000
27-04-2025

A pull request was submitted for review. Branch: lworld URL: https://git.openjdk.org/valhalla/pull/1358 Date: 2025-02-10 18:31:00 +0000
10-02-2025

Seems to be a problem with OSR. This assert that I disabled might actually catch this problem: https://github.com/openjdk/valhalla/blob/fcf2f79683aeb005b9991faaafa68e2ca440ec4c/src/hotspot/share/opto/inlinetypenode.cpp#L890
25-07-2024

TestValueConstruction uses randomization, maybe fixing the seed will help.
27-06-2024