[lworld] Integrated: 8355299: [lworld] C2 compilation fails with "unexpected yanked node"
Tobias Hartmann
thartmann at openjdk.org
Thu Apr 24 13:22:16 UTC 2025
We hit an assert in the register allocator because a `DecodeN` is kept alive by a `MemBarVolatile`:
o183 ConvL2I === _ o182 [[ o184 ]] #int
o184 CastI2N === o179 o183 [[ o419 ]]
o419 DecodeN === _ o184 [[ o187 65 ]] #float[int:>=0] (java/lang/Cloneable,java/io/Serializable):exact *
o187 MemBarVolatile === o179 o1 o180 o1 o1 o419 [[ o188 o189 64 ]]
65 membar_volatile === 67 0 94 0 0 o419 [[ 66 ]] !jvms: TestGenerated::test11 @ bci:2 (line 201)
The membar is emitted by `InlineTypeNode::convert_from_payload` to prevent a `CastI2N` from floating below a safepoint. This is necessary to avoid having the raw pointer span a safepoint, making it opaque to the GC.
On second thought, I don't think we need a membar to prevent this from happening. I removed it and added a comment explaining the details. All tests, including our stress testing, still pass.
Thanks,
Tobias
-------------
Commit messages:
- 8355299: [lworld] C2 compilation fails with "unexpected yanked node"
Changes: https://git.openjdk.org/valhalla/pull/1442/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1442&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8355299
Stats: 9 lines in 2 files changed: 5 ins; 1 del; 3 mod
Patch: https://git.openjdk.org/valhalla/pull/1442.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1442/head:pull/1442
PR: https://git.openjdk.org/valhalla/pull/1442
More information about the valhalla-dev
mailing list