[External] : Re: Disallowing the dynamic loading of agents by default

Alan Bateman Alan.Bateman at oracle.com
Sat Mar 18 07:21:44 UTC 2023


On 17/03/2023 14:11, Thomas Stüfe wrote:
> :
>
> Investigation shows that there seems to be a bug in attachListener.cpp 
> where we compare AttachOperation::name for "load", but it contains 
> "jcmd":

When using the Attach API, the VirtualMachine.loadAgentXXX methods map 
to a "load" command. The Attach API, jstack, jmap ... pre-date the jcmd 
tool and have their own set of commands known to both the tool/client 
side and the VM side.  The "jcmd" command, used by the jcmd tool, works 
a bit like a HTTP upgrade. So different path, and you are right, jcmd 
JVMTI.agent_load was missed when EnableDynamicAgentLoading was added in 
JDK 9. I've created JDK-8304438 to track it.

-Alan


More information about the serviceability-dev mailing list