RFR: 8297967: Make frame::safe_for_sender safer [v2]
Johannes Bechberger
duke at openjdk.org
Fri Dec 2 06:14:09 UTC 2022
On Fri, 2 Dec 2022 05:38:23 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Imrove fix, thanks Martin
>
> src/hotspot/cpu/aarch64/frame_aarch64.cpp line 268:
>
>> 266: // Will the pc we fetch be non-zero (which we'll find at the oldest frame) and readable
>> 267:
>> 268: if (!thread->is_in_usable_stack((address)this->fp())) {
>
> Is this check really necessary? 'fp_safe' is true when we come here. Then it looks to me that the two preceding checks has already ensured that condition 'thread->is_in_usable_stack((address)this->fp())' will always evaluate to true here.
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/frame_aarch64.cpp#L68
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/frame_aarch64.cpp#L90
I'll get crashes in my fuzzing test case if I leave it out.
-------------
PR: https://git.openjdk.org/jdk/pull/11461
More information about the hotspot-dev
mailing list