RFR: 8365526: Crash with null Symbol passed to SystemDictionary::resolve_or_null [v5]
Coleen Phillimore
coleenp at openjdk.org
Tue Nov 25 21:41:30 UTC 2025
On Tue, 25 Nov 2025 01:23:38 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use put_when_absent and add an assert that the message is the same.
>
> src/hotspot/share/classfile/systemDictionary.cpp line 1877:
>
>> 1875: // only reach here under the same error condition, so we can ignore the potential race with setting
>> 1876: // the message, and set it again.
>> 1877: assert(entry->nest_host_error() == nullptr || strcmp(entry->nest_host_error(), message) == 0, "should be the same message");
>
> Rather than overwrite the message I would keep the existing null check and maintain three cases:
> 1. No entry so add new one with message
> 2. Existing entry with no-message, so add it
> 3. Existing entry with message - just assert message is the same.
The reason it's like this is that the message will leak if it's not added.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28438#discussion_r2559926663
More information about the hotspot-runtime-dev
mailing list