RFR: 8255493: Support for pre-generated java.lang.invoke classes in CDS dynamic archive [v11]

Ioi Lam iklam at openjdk.java.net
Fri Apr 30 04:24:52 UTC 2021


On Fri, 30 Apr 2021 03:57:20 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> What kid of exceptions will be thrown (other than OOM?) Do you mean `CDS.generateLambdaFormHolderClasses()` can generate bad class files?
>
> This is after CDS.generateLambdaFormHolderClasses, we get the byte stream of a class --- we need create instanceklass of the class. The exception is from ClassParser ---- whatever the exception during the process.

The ClassParser will throw an error only if OOM, or if the class is invalid. However, if the class is invalid, it means there's a bug inside generateLambdaFormHolderClasses() -- it's not supposed to generate an invalid class.

So we cannot just print a warning and ignore the error. The user may not notice the error message. 

The archive dumping should fail so the user knows what has happened, and will hopefully report the error to us.

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

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


More information about the hotspot-dev mailing list