RFR: 8276990: Memory leak in invoker.c fillInvokeRequest() during JDI operations [v2]

Roman Kennke rkennke at openjdk.java.net
Wed Feb 2 13:40:33 UTC 2022


On Tue, 1 Feb 2022 19:55:15 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> In `invoker_completeInvokeRequest()` this appears to be the last reference:
> 
> ` jbyte returnType = methodSignature_returnTag(request->methodSignature);`
> 
> I would suggest freeing outside of the `if (!detached)` block and setting it to `NULL`. You might want to add an assert for `NULL` where you are currently freeing the pointer.

Alright, that seems sensible. Thank you!
I am not 100% if methodSignature can always be expected to be != NULL there, as I asserted. WDYT?

-------------

PR: https://git.openjdk.java.net/jdk/pull/7306


More information about the serviceability-dev mailing list