Re: [PATCH] perf jit: close agent in Agent_OnLoad()
From: Haoxiang Li
Date: Wed Dec 24 2025 - 06:39:41 EST
On Wed, 24 Dec 2025 10:39:18 +0000, James Clark wrote:
> Does this actually do anything? jvmti_close() is already called in
> Agent_OnUnload().
I think Agent_OnUnload() is not called if Agent_Onload() fails, so it
is necessary to release the resource.
> The commit message is lacking any details about how this was found or
> what the effect is.
Sorry for that. I found it by a static analyzer prototype and comfirmed
by manual review. I think it leads to a resource leak.
If this is ok, I modify the changelog and resubmit it.
Thanks,
Haoxiang Li