RFR: JDK-8313796: AsyncGetCallTrace crash on unreadable interpreter method pointer [v3]
Johannes Bechberger
jbechberger at openjdk.org
Tue Aug 8 22:08:32 UTC 2023
On Tue, 8 Aug 2023 21:05:57 GMT, Richard Startin <duke at openjdk.org> wrote:
>> src/hotspot/share/runtime/frame.cpp line 311:
>>
>>> 309: }
>>> 310: Method* m = (Method*) SafeFetchN((intptr_t*) m_addr, 0);
>>> 311: if (m == 0) {
>>
>> Small nits:
>> - nullptr instead of 0
>> - you can just return m. Its either nullptr or the Method.
>
> This didn't compile: `error: cannot convert 'std::nullptr_t' to 'intptr_t' {aka 'long int'}` - I put it back to the literal 0.
`(void*)nullptr` is probably best, with `0` it is not directly obvious, that it is a pointer.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15193#discussion_r1287731081
More information about the hotspot-dev
mailing list