RFR: 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading [v6]
Serguei Spitsyn
sspitsyn at openjdk.org
Fri Jun 2 03:44:48 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.
>
> The CSR is:
> [JDK-8309250](https://bugs.openjdk.org/browse/JDK-8309250): jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading
>
> 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
Serguei Spitsyn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- Merge
- review: use output.shouldHaveExitValue(0) in the test
- review: use output.shouldContain()
- move check for EnableDynamicAgentLoading to invoke_Agent_OnAttach
- minor renaming in new test TestJcmdNoAgentLoad.java
- 8304438: jcmd JVMTI.agent_load should obey EnableDynamicAgentLoading
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14244/files
- new: https://git.openjdk.org/jdk/pull/14244/files/6712f24a..18cad064
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14244&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14244&range=04-05
Stats: 8499 lines in 119 files changed: 7217 ins; 645 del; 637 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 serviceability-dev
mailing list