RFR: 8314263: Signed jars triggering Logger finder recursion and StackOverflowError [v2]
Sean Coffey
coffeys at openjdk.org
Fri Aug 25 16:13:58 UTC 2023
On Fri, 25 Aug 2023 10:24:23 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Sean Coffey has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Improve test coverage
>> - Incorporate review comments from Daniel
>
> src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java line 988:
>
>> 986: private static void ensureClassInitialized(Class<?> c) {
>> 987: try {
>> 988: MethodHandles.lookup().ensureInitialized(c);
>
> Hello Sean, should we check if there are any implications, like on startup performance, of using `MethodHandles` in this `BootstrapLogger`?
Thanks for the comments Jai. Latest patch just pushed resolved this - in any case, it looks like the MethodHandles class is loaded very early in the module system (even before the application code)
[0.026s][info][class,load] java.util.HexFormat source: shared objects file
[0.026s][info][class,load] java.util.concurrent.atomic.AtomicInteger source: shared objects file
[0.026s][info][class,load] jdk.internal.module.ModuleBootstrap source: shared objects file
[0.026s][info][class,load] java.lang.invoke.MethodHandles source: shared objects file
[0.026s][info][class,load] java.lang.invoke.MemberName$Factory source: shared objects file
[0.026s][info][class,load] java.lang.invoke.MethodHandles$Lookup source: shared objects file
[0.027s][info][class,load] java.lang.StrictMath source: shared objects file
[0.032s][info][class,load] java.security.SecureClassLoader$DebugHolder source: shared objects file
[0.032s][info][class,load] sun.security.util.Debug source: shared objects file
[0.033s][info][class,load] SignedLoggerFinderTest source: file:/MYREPO/jdk/open/test/jdk/JTwork/classes/0/java/lang/System/LoggerFinder/SignedLoggerFinderTest/SignedLoggerFinderTest.d/
[0.033s][info][class,load] java.lang.NamedPackage source: shared objects file
[0.033s][info][class,load] jdk.internal.misc.MainMethodFinder source: shared objects file
[0.033s][info][class,load] jdk.internal.misc.PreviewFeatures source: shared objects file
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15404#discussion_r1305854273
More information about the core-libs-dev
mailing list