RFR: 8253495: CDS generates non-deterministic output [v2]

Thomas Stuefe stuefe at openjdk.java.net
Fri Mar 11 11:38:38 UTC 2022


On Fri, 11 Mar 2022 08:28:32 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Is reproducibility also a topic for users calling -Xdump with custom JNI coding? Or maybe having the VM instrumented somehow? Since it seems such an easy fix, I would prevent attaching too. At least the user would get a clear error message.
>
>> Is reproducibility also a topic for users calling -Xdump with custom JNI coding? Or maybe having the VM instrumented somehow? Since it seems such an easy fix, I would prevent attaching too. At least the user would get a clear error message.
> 
> It's impossible to execute arbitrary Java code when running "java -Xshare:dump", so this means there's no way to load a JNI library when creating a *static* CDS archive. The loading of JVMTI agents is also not supported. So this is not a case we need to handle. 
> 
> During *dynamic* CDS dumps, arbitrary Java code can execute, but we don't have a requirement for the *dynamic* CDS archive to be deterministic (at least not for now).

Thanks for that clarification. Never mind then :)

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

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



More information about the build-dev mailing list