RFR 8201265: Native memory leak in ClassLoader::add_to_exploded_build_list

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Tue Apr 10 19:20:11 UTC 2018


Yes, this looks really good.
Thank you for fixing this.
Coleen

On 4/10/18 2:49 PM, harold seigel wrote:
> Hi Lois,
>
> I think your suggestion is a good one.  Please see updated webrev at:
>
>    http://cr.openjdk.java.net/~hseigel/bug_8201265.2/webrev/
>
> Thanks, Harold
>
>
> On 4/9/2018 5:16 PM, Lois Foltan wrote:
>> On 4/9/2018 4:35 PM, harold seigel wrote:
>>
>>> Hi,
>>>
>>> Please review this small fix for JDK-8201265.  The fix deletes the 
>>> native memory before propagating back the exception.
>>>
>>> Open Webrev: 
>>> http://cr.openjdk.java.net/~hseigel/bug_8201265/webrev/index.html
>> Hi Harold,
>>
>> I think the use of NEW_C_HEAP_ARRAY at line #874 is incorrect within 
>> ClassLoader::add_to_exploded_build_list().  If you look at both lines 
>> #754 & 818, NEW_RESOURCE_ARRAY is used prior to the call to 
>> create_class_path_entry().  I believe all the 
>> ClassLoader::create_class_path_entry() constructors for file, dir, 
>> zip, etc. allocate their own C_HEAP_ARRAY and make a copy of the 
>> "path" parameter.
>>
>> So I think the correct fix is to change #874 to use 
>> NEW_RESOURCE_ARRAY and remove the lines you added to check for 
>> pending exception.  And remove the FREE_C_HEAP_ARRAY at line #900.
>>
>> Thanks,
>> Lois
>>
>>>
>>> JBS Bug:  https://bugs.openjdk.java.net/browse/JDK-8201265
>>>
>>> This fix was tested with Mach5 tiers 1 and 2 tests and builds on all 
>>> Mach5 platforms and with tiers 3-5 tests on Linux-x64.
>>>
>>> Thanks, Harold
>>>
>>
>



More information about the hotspot-runtime-dev mailing list