RFR: 8287325: AArch64: fix virtual threads with -XX:UseBranchProtection=pac-ret [v2]

Hao Sun haosun at openjdk.org
Fri Apr 7 03:25:50 UTC 2023


On Thu, 6 Apr 2023 09:02:13 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Thanks for your code review.
>> 
>> From `ContinuationHelper::Frame::patch_pc(const frame& f, address pc)` and `void frame::patch_pc(Thread* thread, address pc)`, I thought "patch_pc" means replacing the original PC with the new one, i.e. the argument PC.
>> 
>> In this function `ContinuationHelper::patch_pc_at(intptr_t* sp, address pc)`, I followed the notion that **updating the original PC at address SP with the argument PC**. That's why I used "patch_pc_at".
>> 
>> If you think it's not a good name, how about `set_pc_at()`?
>> Thanks.
>
>> Thanks for your code review.
>> 
>> From `ContinuationHelper::Frame::patch_pc(const frame& f, address pc)` and `void frame::patch_pc(Thread* thread, address pc)`, I thought "patch_pc" means replacing the original PC with the new one, i.e. the argument PC.
>> 
>> In this function `ContinuationHelper::patch_pc_at(intptr_t* sp, address pc)`, I followed the notion that **updating the original PC at address SP with the argument PC**. That's why I used "patch_pc_at".
>> 
>> If you think it's not a good name, how about `set_pc_at()`? Thanks.
> 
> A Program Counter is a physical thing. It's made of silicon and metal. It contains an address.
> 
> `patch_return_address_at()` would be fine.

Updated in the latest revision. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13322#discussion_r1160407073


More information about the hotspot-dev mailing list