On Thu, 10 Mar 2022 19:34:29 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> src/hotspot/share/prims/jvm.cpp line 2887: >> >>> 2885: return; >>> 2886: } >>> 2887: #endif >> >> Should we do this for jni_AttachCurrentThread too? > > This hasn't been necessary for me because jni_AttachCurrentThread is not > called during "java -Xshare:dump", which executes under a very strict > condition and doesn't normally allow arbitrary JNI libraries to be loaded.
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. ------------- PR: https://git.openjdk.java.net/jdk/pull/7748