RE: RFR(XXS): 8214161: java.lang.IllegalAccessError: class jdk.internal.event.X509CertificateEvent (in module java.base) cannot access class jdk.jfr.internal.handlers.EventHandler (in module jdk.jfr)
Thank you David and Erik for taking a look at this. Cheers Markus -Original Message- From: David Holmes Sent: den 22 november 2018 23:27 To: Markus Gronlund ; hotspot-runtime-...@openjdk.java.net; core-libs-dev Subject: Re: RFR(XXS): 8214161: java.lang.IllegalAccessError: class jdk.internal.event.X509CertificateEvent (in module java.base) cannot access class jdk.jfr.internal.handlers.EventHandler (in module jdk.jfr) because module java.base does not read module jdk.jfr Hi Markus, Thanks for the explanation of the problem. Reviewed. Thanks, David On 23/11/2018 1:01 am, Markus Gronlund wrote: > Greetings, > > Please review the following small fix. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8214161 > Webrev: http://cr.openjdk.java.net/~mgronlun/8214161/webrev01/ > > diff -r 0a77b7e41322 -r cec1604a9b89 > src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp > --- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp > Thu Nov 22 11:15:53 2018 +0100 > +++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp > Thu Nov 22 15:18:50 2018 +0100 > @@ -447,6 +447,7 @@ > if (registered_symbol == NULL) { > registered_symbol = SymbolTable::lookup_only(registered_constant, > sizeof registered_constant - 1, unused_hash); > if (registered_symbol == NULL) { > + untypedEventHandler = true; > return false; > } > } > > Description: > > Events in module java.base can't refer to types in module "jdk.jfr" before > the jdk.jfr module is loaded and valid read edges established. > Unfortunately, there exist an uncovered exit path in the code that leaves the > eventHandler field "jdk.jfr"-typed, when it should not be. > > Javap output: > > Existing: > public final class jdk.internal.event.X509CertificateEvent extends > jdk.internal.event.Event ... > private static jdk.jfr.internal.handlers.EventHandler eventHandler; > descriptor: Ljdk/jfr/internal/handlers/EventHandler; > flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC > > Fix: > public final class jdk.internal.event.X509CertificateEvent extends > jdk.internal.event.Event ... > private static java.lang.Object eventHandler; > descriptor: Ljava/lang/Object; > flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC > > Tests: open/test/jdk/:jdk_jfr > > Thanks > Markus >
Re: RFR(XXS): 8214161: java.lang.IllegalAccessError: class jdk.internal.event.X509CertificateEvent (in module java.base) cannot access class jdk.jfr.internal.handlers.EventHandler (in module jdk.jfr)
Hi Markus, Thanks for the explanation of the problem. Reviewed. Thanks, David On 23/11/2018 1:01 am, Markus Gronlund wrote: Greetings, Please review the following small fix. Bug: https://bugs.openjdk.java.net/browse/JDK-8214161 Webrev: http://cr.openjdk.java.net/~mgronlun/8214161/webrev01/ diff -r 0a77b7e41322 -r cec1604a9b89 src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp --- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp Thu Nov 22 11:15:53 2018 +0100 +++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp Thu Nov 22 15:18:50 2018 +0100 @@ -447,6 +447,7 @@ if (registered_symbol == NULL) { registered_symbol = SymbolTable::lookup_only(registered_constant, sizeof registered_constant - 1, unused_hash); if (registered_symbol == NULL) { + untypedEventHandler = true; return false; } } Description: Events in module java.base can't refer to types in module "jdk.jfr" before the jdk.jfr module is loaded and valid read edges established. Unfortunately, there exist an uncovered exit path in the code that leaves the eventHandler field "jdk.jfr"-typed, when it should not be. Javap output: Existing: public final class jdk.internal.event.X509CertificateEvent extends jdk.internal.event.Event ... private static jdk.jfr.internal.handlers.EventHandler eventHandler; descriptor: Ljdk/jfr/internal/handlers/EventHandler; flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC Fix: public final class jdk.internal.event.X509CertificateEvent extends jdk.internal.event.Event ... private static java.lang.Object eventHandler; descriptor: Ljava/lang/Object; flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC Tests: open/test/jdk/:jdk_jfr Thanks Markus
Re: RFR(XXS): 8214161: java.lang.IllegalAccessError: class jdk.internal.event.X509CertificateEvent (in module java.base) cannot access class jdk.jfr.internal.handlers.EventHandler (in module jdk.jfr)
Looks good. Erik > On 22 Nov 2018, at 16:01, Markus Gronlund wrote: > > Greetings, > > Please review the following small fix. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8214161 > Webrev: http://cr.openjdk.java.net/~mgronlun/8214161/webrev01/ > > diff -r 0a77b7e41322 -r cec1604a9b89 > src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp > --- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp > Thu Nov 22 11:15:53 2018 +0100 > +++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp > Thu Nov 22 15:18:50 2018 +0100 > @@ -447,6 +447,7 @@ > if (registered_symbol == NULL) { > registered_symbol = SymbolTable::lookup_only(registered_constant, sizeof > registered_constant - 1, unused_hash); > if (registered_symbol == NULL) { > + untypedEventHandler = true; > return false; > } > } > > Description: > > Events in module java.base can't refer to types in module "jdk.jfr" before > the jdk.jfr module is loaded and valid read edges established. > Unfortunately, there exist an uncovered exit path in the code that leaves the > eventHandler field "jdk.jfr"-typed, when it should not be. > > Javap output: > > Existing: > public final class jdk.internal.event.X509CertificateEvent extends > jdk.internal.event.Event > ... > private static jdk.jfr.internal.handlers.EventHandler eventHandler; > descriptor: Ljdk/jfr/internal/handlers/EventHandler; > flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC > > Fix: > public final class jdk.internal.event.X509CertificateEvent extends > jdk.internal.event.Event > ... > private static java.lang.Object eventHandler; > descriptor: Ljava/lang/Object; > flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC > > Tests: open/test/jdk/:jdk_jfr > > Thanks > Markus
RFR(XXS): 8214161: java.lang.IllegalAccessError: class jdk.internal.event.X509CertificateEvent (in module java.base) cannot access class jdk.jfr.internal.handlers.EventHandler (in module jdk.jfr) beca
Greetings, Please review the following small fix. Bug: https://bugs.openjdk.java.net/browse/JDK-8214161 Webrev: http://cr.openjdk.java.net/~mgronlun/8214161/webrev01/ diff -r 0a77b7e41322 -r cec1604a9b89 src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp --- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp Thu Nov 22 11:15:53 2018 +0100 +++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp Thu Nov 22 15:18:50 2018 +0100 @@ -447,6 +447,7 @@ if (registered_symbol == NULL) { registered_symbol = SymbolTable::lookup_only(registered_constant, sizeof registered_constant - 1, unused_hash); if (registered_symbol == NULL) { + untypedEventHandler = true; return false; } } Description: Events in module java.base can't refer to types in module "jdk.jfr" before the jdk.jfr module is loaded and valid read edges established. Unfortunately, there exist an uncovered exit path in the code that leaves the eventHandler field "jdk.jfr"-typed, when it should not be. Javap output: Existing: public final class jdk.internal.event.X509CertificateEvent extends jdk.internal.event.Event ... private static jdk.jfr.internal.handlers.EventHandler eventHandler; descriptor: Ljdk/jfr/internal/handlers/EventHandler; flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC Fix: public final class jdk.internal.event.X509CertificateEvent extends jdk.internal.event.Event ... private static java.lang.Object eventHandler; descriptor: Ljava/lang/Object; flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC Tests: open/test/jdk/:jdk_jfr Thanks Markus