RFR: 8282306: os::is_first_C_frame(frame*) crashes on invalid link access [v2]

Johannes Bechberger duke at openjdk.java.net
Wed Feb 23 21:39:44 UTC 2022


On Wed, 23 Feb 2022 19:31:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Improve use of C macros
>
> src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp line 155:
> 
>> 153: inline intptr_t* frame::link() const              { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
>> 154: 
>> 155: inline bool frame::can_access_link(Thread *thread) const { return thread->is_in_full_stack((address)addr_at(link_offset)); }
> 
> is there a reason Thread* is non-const in all your variants of can_access_link and is_first_c_frame?

No there is none.

> src/hotspot/cpu/zero/frame_zero.inline.hpp line 85:
> 
>> 83: }
>> 84: 
>> 85: inline bool frame::can_access_link(Thread *t) const {
> 
> Did you test zero? Would this not just crash it?

You're correct, I look into this.

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

PR: https://git.openjdk.java.net/jdk/pull/7591


More information about the hotspot-dev mailing list