RFR: 8313796: AsyncGetCallTrace crash on unreadable interpreter method pointer [v4]

Richard Startin duke at openjdk.org
Mon Aug 7 21:52:50 UTC 2023


On Mon, 7 Aug 2023 21:11:59 GMT, Richard Startin <duke at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/frame_aarch64.cpp line 511:
>> 
>>> 509:   // first the method
>>> 510:   Method** m_addr = interpreter_frame_method_addr();
>>> 511:   if (m_addr == nullptr || !os::is_readable_pointer(m_addr)) {
>> 
>> Just wondering, why checking `is_readable_pointer` + dereference instead of `SafeFetch` which does both in one shot? Especially since `os::is_readable_pointer` is implemented with `SafeFetch` anyway.
>
> Thanks for the question. I've just removed the `is_readable_pointer` check since it's not necessary. We only observed a null pointer so the null check is sufficient.

I implemented @theRealAph's suggestion instead, please take a look

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15178#discussion_r1286410702


More information about the hotspot-dev mailing list