RFR (XS): 8132892: Memory must be freed after calling Arguments::set_sysclasspath function

Dmitry Dmitriev dmitry.dmitriev at oracle.com
Fri Aug 7 08:02:19 UTC 2015


Hello David,

Thank you for review and sponsorship. Yes, sure, let's wait for one more 
review. It seems that it a long standing issue, since set_sysclasspath 
and SystemProperty class not changed for a while.

Dmitry

On 07.08.2015 5:37, David Holmes wrote:
> Hi Dmitry,
>
> This looks good to me and I can sponsor it for you. Not sure if I can 
> squeeze it under the "trivial" bar so we only need one review. :) I've 
> checked all the assertions about allocations and responsibilities and 
> it all seems correct. I'm wondering if this is a long standing issue 
> or whether set_sysclasspath has changed its behaviour?
>
> Thanks,
> David
>
> On 4/08/2015 7:14 PM, Dmitry Dmitriev wrote:
>> Hello,
>>
>> Please review this small fix which fix small memory leak. Also, I need a
>> sponsor for this fix, who can push it.
>>
>> Arguments::set_sysclasspath function call set_value method of
>> SystemProperty class which copy passed value. In several code paths
>> memory is allocated for string and then this string is passed to
>> Arguments::set_sysclasspath. Therefore allocated string should be freed
>> after calling Arguments::set_sysclasspath function.
>>
>> Webrev: http://cr.openjdk.java.net/~ddmitriev/8132892/webrev.00/
>> <http://cr.openjdk.java.net/%7Eddmitriev/8132892/webrev.00/>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8132892
>> Tested: JPRT(hotspot test set), hotspot all, vm.quick
>>
>> Thanks,
>> Dmitry



More information about the hotspot-runtime-dev mailing list