RFR: 8365526: Crash with null Symbol passed to SystemDictionary::resolve_or_null [v5]

David Holmes dholmes at openjdk.org
Wed Nov 26 21:15:56 UTC 2025


On Wed, 26 Nov 2025 13:21:06 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Both of the callers in InstanceKlass::nest_host() add the error from a C heap allocated string:
>> 
>> 
>>         const char* msg = ss.as_string(true /* on C-heap */);
>>         constantPoolHandle cph(THREAD, constants());
>>         SystemDictionary::add_nest_host_error(cph, _nest_host_index, msg);
>
> Ioi and Johan noticed this and Johan has a further improvement to ResourceAllocate the string so that if we don't add it, it will get freed, but that's not the case with the caller today.

Yep I missed that sorry - and of course stringStream no longer behaves the way it used to. We need a follow up to properly deal with the message "ownership" issue in the ResolutionErrorEntry constructors so that they get freed appropriately when needed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28438#discussion_r2566503333


More information about the hotspot-runtime-dev mailing list