On Tue, 2 Jun 2026 02:05:42 GMT, Dean Long <[email protected]> wrote:
>> Quan Anh Mai has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains two additional
>> commits since the last revision:
>>
>> - Merge branch 'lworld' into reachabilityfence
>> - Fix ReachabilityFlagsTest
>
> src/hotspot/share/opto/library_call.cpp line 7886:
>
>> 7884: Node* referent = argument(0);
>> 7885: if (referent->is_InlineType()) {
>> 7886: referent = referent->as_InlineType()->buffer(this);
>
> Please explain. The test doesn't trigger this code, so how do we test it? I
> thought the whole point of reachabilityFence was to prevent a finalizer from
> running too early, but what does that even mean for an InlineType that might
> not be heap allocated? Wouldn't it be a no-op or even better, an error, like
> trying to synchronize on a value object? Or are we now saying that
> reachabilityFence on an inline type really means "do not scalarize, make sure
> finalizer gets run, but not until we get here"?
In other words, I think reachabilityFence() requires an identity object for
correct semantics. I think there could be scenarios where buffering a copy is
not enough. Does that mean that instead of the finalizer running exactly 1
time, now it will run once for every buffered copy?
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2496#discussion_r3338242599