[External] : Re: Verification in agent transformers
Alan Bateman
alan.bateman at oracle.com
Sat Mar 8 08:55:30 UTC 2025
On 07/03/2025 23:50, Ryan Ernst wrote:
> > If the class is loaded and then linked, and is not on the bootstrap
> class loader, then it should be verified.
>
> I agree, but that’s not what we observed. We only see the VerifyError
> if retransformClasses is called. If instead the class is loaded after
> the transformer has been registered, no VerifyError occurs, even
> though the transformer produced technically broken bytecode (I say
> “technically” because although the parameter type was wrong, we never
> used the parameter in this method, so it didn’t actually cause any
> problems at runtime, it was just a bad reference on the stack that was
> ignored).
I think the question you are asking is whether there is verification of
classes modified at class load time with a ClassFileTransformer
(ClassFileLoadHook in JVMTI speak) when those classes are in modules
mapped to the boot class loader.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20250308/ccab9fe8/attachment.htm>
More information about the hotspot-dev
mailing list