[lworld] RFR: 8359345: [lworld] C2 crashes with -XX:ForceNonTearable=*
Tobias Hartmann
thartmann at openjdk.org
Tue Jul 1 10:21:02 UTC 2025
On Tue, 1 Jul 2025 08:44:36 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Thanks for your comments Quan-Anh, I missed them earlier. Let me double-check!
>
> @TobiHartmann I think I know why. `CastI2N` returns a `TypeNarrowOop::BOTTOM`, which is then casted to the correct type at `DecodeNNode`. However, at matching, we skip through the `DecodeN`. As a result, `15 loadL` is a load from `TypeOopPtr::BOTTOM + 16` which the alias cannot be known to be immutable. I think this mismatch type can happen easily due to dropping `CastPP` at the end of optimization. I suggest clearing `Flag_needs_anti_dependence_check` when we rewire the node at `MemNode::optimize_simple_memory_chain`, or even clearing them at creation if their `adr_type` is non-rewritable.
I'll pushed this and updated the description. Will run some more testing. Thanks again for looking into this, @merykitty.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1494#issuecomment-3023187269
More information about the valhalla-dev
mailing list