RFR: 8297967: Make frame::safe_for_sender safer [v6]
Martin Doerr
mdoerr at openjdk.org
Mon Apr 24 14:02:59 UTC 2023
On Mon, 24 Apr 2023 09:52:05 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> Makes `frame::safe_for_sender` safer by checking that the location of the return address, sender stack pointer, and link address is accessible. This makes the method safer in the case of broken frames.
>
> Johannes Bechberger has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>
> - Remove errorneously added check
> - Remove check for value that might be null
> - More SafeFetch
> - Make frame::safe_for_sender safer with SafeFetch
I'm still trying to understand the underlying problem. I guess that FP points into a read protected (or uncommitted) part of the stack which isn't caught by the `fp_safe` checks for some reason. Using 3 safefetch checks is a bit much, because we shouldn't have gaps within a frame. On the other hand, checking exactly the 3 fields we need sounds like a good idea and your checks should be affordable from performance point of view. I'm ok with it, but I'd like to hear more opinions.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/11461#issuecomment-1520215175
More information about the hotspot-dev
mailing list