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

Andrew Haley aph at openjdk.org
Thu Apr 6 09:05:17 UTC 2023


On Thu, 6 Apr 2023 02:47:54 GMT, Hao Sun <haosun 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.

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.

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

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


More information about the hotspot-dev mailing list