RFR: 8365526: Crash with null Symbol passed to SystemDictionary::resolve_or_null [v2]
Ioi Lam
iklam at openjdk.org
Sun Nov 23 21:26:48 UTC 2025
On Sat, 22 Nov 2025 21:55:57 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> 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.
`put_when_absent` means "put it in the table when I know it's absent". It already has the assert that you want.
https://github.com/openjdk/jdk/blob/e18e95ed11c1df7eeb162c2303f027564ed6f6aa/src/hotspot/share/utilities/hashTable.hpp#L149-L152
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28438#discussion_r2554332131
More information about the hotspot-runtime-dev
mailing list