RFR: 8368182: AOT cache creation fails with class defined by JNI [v2]

Ioi Lam iklam at openjdk.org
Tue Sep 23 21:53:47 UTC 2025


On Tue, 23 Sep 2025 06:38:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Forgot to check in code that was supposed in the last changeset
>>  - @dholmes-ora review comments; also cleaned up code and fixed incorrect comment
>
> src/hotspot/share/cds/lambdaFormInvokers.cpp line 203:
> 
>> 201:       char *buf = NEW_RESOURCE_ARRAY(char, len);
>> 202:       memcpy(buf, (char*)h_bytes->byte_at_addr(0), len);
>> 203:       ClassFileStream st((u1*)buf, len, "jrt:/java.base");
> 
> Are lambdaForms only ever from java.base?

This code regenerates the following 4 classes, which are in java.base:

- java.lang.invoke.Invokers$Holder
- java.lang.invoke.DirectMethodHandle$Holder
- java.lang.invoke.DelegatingMethodHandle$Holder
- java.lang.invoke.LambdaForm$Holder

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27412#discussion_r2373527587


More information about the hotspot-runtime-dev mailing list