[crac] RFR: Provide arguments for restore [v5]

Anton Kozlov akozlov at openjdk.java.net
Tue Mar 22 16:00:12 UTC 2022


On Fri, 18 Mar 2022 13:56:41 GMT, Dan Heidinga <heidinga at openjdk.org> wrote:

>> Anton Kozlov has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Use System class loader
>>  - Make catch() preceise
>
> src/java.base/share/classes/jdk/crac/Core.java line 171:
> 
>> 169:                     Method newMain = newMainClass.getDeclaredMethod("main",
>> 170:                         String[].class);
>> 171:                     newMain.setAccessible(true);
> 
> Good catch on adding the `setAccessible` call.  
> 
> Given that the VM is doing the lookup based on the command line parameters, we should be wrapping this with a `AccessController::doPrivileged` block as a SecurityManager shouldn't be able to block this accessibility request.

I was unsure about SecurityManager, having it will be removed soon. However, while it's still there, and adding necessary code is not hard, it's worth fixing.

I'm trying to push the fix, but GitHub sends me "Internal Server Error". Hope this will be resolved soon.

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

PR: https://git.openjdk.java.net/crac/pull/16


More information about the crac-dev mailing list