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

Coleen Phillimore coleenp at openjdk.org
Sat Nov 22 22:07:23 UTC 2025


On Sat, 22 Nov 2025 00:26:24 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Reorder if statement and add an assert.
>
> src/hotspot/share/classfile/resolutionErrors.cpp line 90:
> 
>> 88:   bool created = false;
>> 89:   _resolution_error_table->put_if_absent(key, entry, &created);
>> 90:   assert(created, "should be created not updated");
> 
> The above 3 lines can be replaced with `_resolution_error_table->put_when_absent(key, entry)`.

If I use that, I lose the ability to assert that the new entry was created and not already found, which I really want.

> src/hotspot/share/classfile/systemDictionary.cpp line 1870:
> 
>> 1868:       // Only add a new resolution error if one hasn't been found for this constant pool index. In this case,
>> 1869:       // resolution succeeded but there's an error in this nest host.
>> 1870:       assert(pool->resolved_klass_at(which) != nullptr, "klass is should be resolved if there is no entry");
> 
> typo: `"klass should be resolved ...`

Fixed.

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

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


More information about the hotspot-runtime-dev mailing list