[jdk21u-dev] RFR: 8369506: Bytecode rewriting causes Java heap corruption on AArch64 [v2]

Justin King jcking at openjdk.org
Fri Oct 17 19:12:06 UTC 2025


On Fri, 17 Oct 2025 17:07:56 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace oopDesc::base_offset_in_bytes with equivalent logic
>>   
>>   Signed-off-by: Justin King <jcking at google.com>
>
> src/hotspot/cpu/aarch64/templateTable_aarch64.cpp line 3152:
> 
>> 3150:   __ ldr(r0, aaddress(0));
>> 3151:   // access constant pool cache
>> 3152:   __ get_cache_and_index_at_bcp(r2, r3, 2);
> 
> I spent a little while looking at the other uses of `get_cache_and_index_at_bcp` and I couldn't find anything obviously wrong, but that might not mean we're OK.

Ran this change with our reproducer, and no observable failures. I also made `verify_field_offset` be present in the optimized build to be sure. So I think we are good. This is as approximate of a fix we can get I think.

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

PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/2355#discussion_r2440979236


More information about the jdk-updates-dev mailing list