RFR: 8282306: os::is_first_C_frame(frame*) crashes on invalid link access [v9]
Thomas Stuefe
stuefe at openjdk.java.net
Sat Feb 26 06:18:57 UTC 2022
On Sat, 26 Feb 2022 05:57:06 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/share/runtime/os.cpp line 1193:
>>
>>> 1191:
>>> 1192: uintptr_t usp = (uintptr_t)fr->sp();
>>> 1193: if ((usp & sp_align_mask) != 0 || !os::is_readable_pointer((const void*)usp)) return true;
>>
>> remove cast
>
> Also, could you factor out this test to a local helper, something like:
>
> static bool pointer_is_bad(uintptr_t p) {
> ...
> }
>
> ?
And the alignment check would be more readable with the is_aligned() function from align.hpp (this is old code, the function did not exist back then).
-------------
PR: https://git.openjdk.java.net/jdk/pull/7591
More information about the hotspot-dev
mailing list