[External] : Re: JEP draft: Disallow the Dynamic Loading of Agents by Default
Eirik Bjørsnøs
eirbjo at gmail.com
Mon May 1 17:04:31 UTC 2023
>
> Keep in mind two things:
>
> 1. Dynamically loaded agents are more limited in their capabilities than
> agents loaded at startup because redefinition/retransformation is limited
> to changing the body of existing methods. Redefinition can only fix issues
> if you’re lucky.
>
> 2. Java offers no general mechanism to make patches applied through
> redefinition persistent. They are reverted at the next startup.
>
Ron,
My concern was more the observation that the Summary of the draft JEP can
be misunderstood, (It seems to have happened in this thread):
Disallow the dynamic loading of agents into a running JVM by default.
> Agents are used by profiling tools to instrument Java applications, but
> agents can also be misused to undermine the integrity of the Java Platform.
I think the second sentence here ("agents can also be misused..") was meant
to refer specifically to dynamically loaded agents, not agents in general.
To help avoid confusion, this sentence could be updated to clarify that
it's the dynamic loading that is misused, not the agent mechanism per se.
Something like: "but *dynamically loaded agents* can also be misused to.."
I know the leading sentence defines the context, but I think a bit of
redunancy here would help reduce misunderstandings and prevent people from
thinking "now they're taking away agents too".
Thanks,
Eirik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20230501/b25f278d/attachment.htm>
More information about the jigsaw-dev
mailing list