-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JDK11 OJDK-MH] AccessControlException: Access denied #14555
Comments
re #14555 (comment): RI doesn't throw the |
It is not immediately clear why |
Run
The |
In AccessController.java, access was denied for the "sun.util.logging" package, causing the test to fail.
Further investigation is needed to identify and resolve the root cause of the issue. (edited) (edited) |
Update In such case, we might introduce an |
MethodHandleResolver.resolveInvokeDynamic (linkage) relies upon MethodType.fromMethodDescriptorString to derive the MethodType from the method descriptor string. Enabling OJDK's MethodType.fromMethodDescriptorString in OpenJ9 JDK11 causes an AccessControlException, which makes it unsuitable for usage during linkage. resolveInvokeDynamic (linkage) can employ its own approach to derive the MethodType from the method descriptor string. To resolve the AccessControlException, a helper method is derived from OJ9's MethodType.fromMethodDescriptorString, and it is utilized in MethodHandleResolver. The helper also enables a Map based cache per ClassLoader in both implementations. Currently, the cache is only available in OJ9 MHs. Related: eclipse-openj9#14555 Signed-off-by: Babneet Singh <[email protected]>
Closing ... fixed by #18264. |
MethodHandleResolver.resolveInvokeDynamic (linkage) relies upon MethodType.fromMethodDescriptorString to derive the MethodType from the method descriptor string. Enabling OJDK's MethodType.fromMethodDescriptorString in OpenJ9 JDK11 causes an AccessControlException, which makes it unsuitable for usage during linkage. resolveInvokeDynamic (linkage) can employ its own approach to derive the MethodType from the method descriptor string. To resolve the AccessControlException, a helper method is derived from OJ9's MethodType.fromMethodDescriptorString, and it is utilized in MethodHandleResolver. The helper also enables a Map based cache per ClassLoader in both implementations. Currently, the cache is only available in OJ9 MHs. Related: eclipse-openj9#14555 Signed-off-by: Babneet Singh <[email protected]>
The below failure(s) is(are) only seen when OJDK MHs are enabled in OpenJ9.
Errors
Failing Test Targets
BUILD_LIST=openjdk
java/lang/System/LoggerFinder/internal/BasePlatformLoggerTest/BasePlatformLoggerTest.java
java/lang/System/LoggerFinder/internal/PlatformLoggerBridgeTest/PlatformLoggerBridgeTest.java
How-to Run Tests?
https://github.com/eclipse/openj9/blob/master/test/docs/OpenJ9TestUserGuide.md
Steps to build an OpenJ9 JDK11 with OJDK MHs enabled
Refer to #14540.
The text was updated successfully, but these errors were encountered: