[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics

Quan Anh Mai qamai at openjdk.org
Wed Mar 26 14:14:14 UTC 2025


On Wed, 26 Mar 2025 09:01:31 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Hi,
>> 
>> As a step of #1405, I would like to remove the usage of larval value objects in `Unsafe` intrinsics. This patch also tries to make sure that `Unsafe::makePrivateBuffer` and `Unsafe::finishPrivateBuffer` are always inlined, so that larval objects do not cross call boundaries except for invoking object constructors.
>> 
>> Please take a look and review this PR, thanks a lot.
>
> I just had a look at https://github.com/openjdk/valhalla/pull/1405, thanks for working on this @merykitty. 
> 
>> so that larval objects do not cross call boundaries except for invoking object constructors
> 
> But this will not prevent users from passing larval objects created via `makePrivateBuffer` to other methods, right? I.e., we still have the issues described in [JDK-8239003](https://bugs.openjdk.org/browse/JDK-8239003) (and linked issues).

@TobiHartmann

> But this will not prevent users from passing larval objects created via makePrivateBuffer to other methods, right? I.e., we still have the issues described in [JDK-8239003](https://bugs.openjdk.org/browse/JDK-8239003) (and linked issues).

My stance on this matter is that we should simply disallow passing larval objects except to `Unsafe::putXXX` and `Unsafe::finishPrivateBuffer`. What do you think?

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

PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2754571231


More information about the valhalla-dev mailing list