RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading
Serguei Spitsyn
sspitsyn at openjdk.org
Wed May 31 10:16:39 UTC 2023
The VM option EnableDynamicAgentLoading was added in JDK 9, default true, to allow deployment to choose whether to allow agents to be loaded/started in the VM. The VM option does the right thing for tools using the Attach API but jcmd JVMTI.agent_load was missed. This should be fixed to disallow loading JVMTI agents when the EnableDynamicAgentLoading is false.
Testing:
- run new test `test/jdk/sun/tools/jcmd/TestJcmdNoAgentLoad.java`
- TBD: submit mach5 tiers 1-5 to make sure no new regressions are introduced
-------------
Commit messages:
- 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading
Changes: https://git.openjdk.org/jdk/pull/14244/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14244&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8304438
Stats: 78 lines in 2 files changed: 78 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/14244.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14244/head:pull/14244
PR: https://git.openjdk.org/jdk/pull/14244
More information about the core-libs-dev
mailing list