RFR: 8371418: Methods in AdapterHandlerLibrary use HashtableBase iterate method incorrectly [v2]

Vladimir Kozlov kvn at openjdk.org
Fri Nov 7 16:31:07 UTC 2025


On Fri, 7 Nov 2025 16:12:13 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> src/hotspot/share/runtime/sharedRuntime.cpp line 3415:
>> 
>>> 3413: #endif // INCLUDE_CDS
>>> 3414:   if (!found) {
>>> 3415:     auto findblob_runtime_table = [&] (AdapterFingerPrint* key, AdapterHandlerEntry* handler) {
>> 
>> Why do you need to pass `AdapterFingerPrint* key` argument which is not used here?
>
> This is because the `function` passed to `HashTable::iterate` is called with both key and value: https://github.com/openjdk/jdk/blob/c8656449c28581ae9c3d815105e338e42253bb43/src/hotspot/share/utilities/hashTable.hpp#L272

Thank you for pointing this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28197#discussion_r2504449829


More information about the hotspot-dev mailing list