[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics [v2]
Jatin Bhateja
jbhateja at openjdk.org
Sun Mar 30 13:47:41 UTC 2025
On Sun, 30 Mar 2025 08:25:10 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> Undefined behaviour means that any behaviour is an acceptable behaviour. C1 can execute just fine and it is an acceptable outcome, C2 crashes and it is also an acceptable outcome.
>From user standpoint be it C1 or C2 compiler, JVM needs to be consistent w.r.t to undefined behavior and crash is not acceptable.
> I believe setting `AllocateNode._larval` to true will make the expansion include setting the larval bit.
Yes, AllocateNode::make_ideal_mark handles this.
>> No, it is wrong, from the verification type system, the highest reference type in the type hierarchy is reference, which comprises java.lang.Object and larval objects (uninitialized). Larval objects have their types being subtypes of uninitialized and non-larval objects have their types being subtypes of java.lang.Object. These 2 are separate under the bytecode verifier.
I see your point , but the contention here is that value types have a default value see
https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/share/oops/instanceKlass.cpp#L1459
So, technically they don't qualify as uninitialized objects.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2764569554
More information about the valhalla-dev
mailing list