RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9]

Anton Kozlov akozlov at openjdk.java.net
Fri Feb 12 13:50:49 UTC 2021


On Wed, 3 Feb 2021 09:11:50 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 323:
>> 
>>> 321:   str(zr, Address(rthread, JavaThread::last_Java_pc_offset()));
>>> 322: 
>>> 323:   str(zr, Address(rthread, JavaFrameAnchor::saved_fp_address_offset()));
>> 
>> I don't think this switch from `JavaThread::saved_fp_address_offset()`
>> to `JavaFrameAnchor::saved_fp_address_offset()` is correct since
>> `rthread` is still used and is a JavaThread*. The new code will give you:
>> 
>>     `rthread` + offset of the `saved_fp_address` field in a JavaFrameAnchor
>> 
>> The old code gave you:
>> 
>>     `rthread` + offset of the `saved_fp_address` field in the JavaFrameAnchor field in the JavaThread
>> 
>> Those are not the same things.
>
> I agree, I don't understand why this change was made.

Wow, this is scary. I don't understand how I've merged JDK-8257882 like this. I've reviewed cpu/aarch64 changes again, there is nothing suspicious besides this. Thank you very much for catching, fixed.

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

PR: https://git.openjdk.java.net/jdk/pull/2200


More information about the security-dev mailing list