RFR: 8345390: [ubsan] systemDictionaryShared.cpp:964: member call on null pointer
Ioi Lam
iklam at openjdk.org
Mon Dec 9 20:38:41 UTC 2024
On Thu, 5 Dec 2024 08:45:31 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> (For JDK 25).
>>
>> It's possible for the `member_method` parameter to be `nullptr`. Since `member_method->is_shared()` only checks the range of `this` and doesn't dereference it, we don't have a crash, and the problem was found only when running with ubsan.
>>
>> However, the code was wrong, as `((Method*)nullptr)->is_shared()` would return `false`, making it impossible to load the archived Lambda class.
>>
>> After the fix, I modified the test case to ensure that the Lambda class can be correctly loaded from the archive.
>
> Marked as reviewed by mbaesken (Reviewer).
Thanks @MBaesken and @kimbarrett for the review
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22560#issuecomment-2529389745
More information about the hotspot-runtime-dev
mailing list