[lworld] Integrated: 8367767: [lworld] Interpreter adherence to new memory model rules for strict instance fields
Tobias Hartmann
thartmann at openjdk.org
Thu Oct 2 13:04:28 UTC 2025
On Thu, 2 Oct 2025 12:21:07 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Create new method entry for the interpreter to add a memory barrier when entering the j.l.Object constructor.
>
> src/hotspot/share/interpreter/abstractInterpreter.cpp line 157:
>
>> 155: // We need to execute the special return bytecode to check for
>> 156: // finalizer registration so create a normal frame.
>> 157: // No need to use the method kind with a memory barrier on entry
>
> I don't think this is correct because the return bytecode will be rewritten:
> https://github.com/openjdk/valhalla/blob/2abd3a90185e5ec06f3cb12b92d9d0452681673e/src/hotspot/share/interpreter/rewriter.cpp#L537-L541
> ->
> https://github.com/openjdk/valhalla/blob/2abd3a90185e5ec06f3cb12b92d9d0452681673e/src/hotspot/share/interpreter/rewriter.cpp#L161
>
> And thus, this code will never be executed:
> https://github.com/openjdk/valhalla/blob/2abd3a90185e5ec06f3cb12b92d9d0452681673e/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp#L2310-L2314
I filed [JDK-8369044](https://bugs.openjdk.org/browse/JDK-8369044).
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1647#discussion_r2398768237
More information about the valhalla-dev
mailing list