[lworld] Integrated: 8367767: [lworld] Interpreter adherence to new memory model rules for strict instance fields
Tobias Hartmann
thartmann at openjdk.org
Thu Oct 2 12:24:20 UTC 2025
On Tue, 30 Sep 2025 19:29:03 GMT, Frederic Parain <fparain 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
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1647#discussion_r2398611543
More information about the valhalla-dev
mailing list