[16] RFR(XS) Potential memory leak in TypedMethodOptionMatcher

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jul 9 15:51:32 UTC 2020


Looks good. I thought about adding NULL check but ::free() accepts NULLs. NMT can also process NULL.

Thanks,
Vladimir

On 7/9/20 6:19 AM, Zhengyu Gu wrote:
> TypedMethodOptionMatcher owns ccstr value (vs. os::strdup_check_oom()), but never frees it in destructor.
> 
> It does not appear to a real issue so far, because TypedMethodOptionMatcher seems immortal. Given it releases _option 
> string, it should also release ccstr value.
> 
> 
> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8249144/webrev.00/
> 
> Test:
>    tier1_compiler on Linux x86_64
>    Submit test in progress
> 
> Thanks,
> 
> -Zhengyu
> 


More information about the hotspot-dev mailing list