RFR: 8263562: Checking if proxy_klass_head is still lambda_proxy_is_available

Yi Yang yyang at openjdk.java.net
Tue Mar 16 02:11:08 UTC 2021


On Mon, 15 Mar 2021 22:14:09 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> The `Shared Lambda Dictionary` section in the result of SharedLambdaDictionaryPrinter will mix normal klasses with lambda proxy klasses. Using the following commands can reproduce it:
>> 
>> Proc1: `./jshell`
>> Proc2: `jcmd <proc1> VM.systemdictionary -verbose`
>> 
>> When all archived lambda proxy classes are used, proxy_klass_head(in RunTimeLambdaProxyClassInfo) is still referring to an instance klass that is no longer lambda_proxy_is_available, and its next_link will be set by classloader to link another normal class. Simply checking if proxy_klass_head is lambda_proxy_is_available can solve this problem.
>> 
>> Best regards,
>> Yang
>
> Marked as reviewed by iklam (Reviewer).

> Looks good and thanks for fixing it.


> > Furthermore, I think we should clear proxy_klass_head when it becomes no longer lambda_proxy_is_available. Any further accesses will be illegal. Just IMHO, I will hold this only if you think it's useful.
> 
> I'd suggesting open another bug for the above since it fixes a different issue.


Hi @calvinccheung,

Thanks for your advice, I will create another PR to do this stuff.

Thanks!
Yang

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

PR: https://git.openjdk.java.net/jdk/pull/3001


More information about the hotspot-runtime-dev mailing list