RFR: 8297967: Make frame::safe_for_sender safer [v2]

David Holmes dholmes at openjdk.org
Fri Dec 2 06:21:14 UTC 2022


On Fri, 2 Dec 2022 06:11:33 GMT, Johannes Bechberger <duke at openjdk.org> wrote:

>> 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.

I agree fp has already been validated.

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

PR: https://git.openjdk.org/jdk/pull/11461


More information about the hotspot-dev mailing list