[lworld] RFR: 8372113: [lworld] Fix various issues with TypeAryPtr and TypeAryKlassPtr [v6]

Quan Anh Mai qamai at openjdk.org
Sat Dec 6 17:18:37 UTC 2025


On Sat, 6 Dec 2025 17:12:36 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> This PR fixes various issues with `TypeAryPtr` and `TypeAryKlassPtr`. It starts with me trying to tighten the properties (`flat`, `null_free`, etc) of these classes, then fixing all the revealed issues until there are no crashes or wrong results left.
>> 
>> Please take a look and leave your reviews, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Should not clone MergeMem

I did not actually manage to reproduce the issue, but inserting a verification that inputs of a `TypePtr::BOTTOM` `Phi` must also be `TypePtr::BOTTOM` revealed what seems to be the issue. It is that we construct the graph incorrectly for an allocation of a flat array, we need to create a `NarrowMemProj`, then split that proj when the slices of flat arrays are split. Currently, the memory state is set to the raw memory input of the `InitializeNode` instead. Could you please test again if the issue is now fixed?

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1755#issuecomment-3620716819


More information about the valhalla-dev mailing list