RFR: 8365526: Crash with null Symbol passed to SystemDictionary::resolve_or_null [v5]
David Holmes
dholmes at openjdk.org
Wed Nov 26 06:31:56 UTC 2025
On Tue, 25 Nov 2025 13:06:34 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> 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.
How does it leak - it originates from a stringStream that will go out of scope???
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28438#discussion_r2563474380
More information about the hotspot-runtime-dev
mailing list