Where to ask about a potential bug/oversight with hidden classes
Matias Koivikko
matias.koivikko at gmail.com
Tue Sep 10 12:35:47 UTC 2024
Hi everyone,
I've been working on a project where I compile custom code to class files
and load them using MethodHandles.Lookup#defineHiddenClass into the jvm.
This seems like the correct method to me as my classes don't need to be
referenced from the outside beyond reflectively calling a single method and
they should ideally unload soon after unless they stored references
somewhere.
As for the bug, it involves lambdas that capture this and a
ClassNotFoundException being thrown for the hidden class. As far as I
understand it, the hidden class gets a randomized name at runtime and all
references to itself within the class file should be replaced. It seems
like this process doesn't work properly for the main NameAndType of an
invokedynamic instruction. This would then cause a runtime crash whenever
capturing lambdas among other uses of indy are used.
Does anyone have any ideas on what I could have done wrong or where I
should take this question further? I assume there's some more appropriate
mailing list to discuss this issue in.
Regards, Matias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/discuss/attachments/20240910/8314123a/attachment.htm>
More information about the discuss
mailing list