Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: fix various leaks in trunk (touches coll/ml, vprotocol, pml/v, btl/openib, and mca/base)
From: George Bosilca (bosilca_at_[hidden])
Date: 2012-11-05 19:01:43


+1!

  george.

On Nov 5, 2012, at 18:59 , Jeff Squyres <jsquyres_at_[hidden]> wrote:

> +1 on the ompi/mca/btl/openib/btl_openib_mca.c and opal/mca/base/mca_base_param.c.
>
> I didn't check the others.
>
>
> On Nov 5, 2012, at 6:31 PM, Nathan Hjelm wrote:
>
>> What: I used valgrind on ompi_info and found several leaks in the trunk. This patch fixes some of the leaks.
>>
>> pml/v:
>> - If vprotocol is not being used vprotocol_include_list is leaked. Assume vprotocol never takes ownership (see below) and always free the string.
>>
>> coll/ml:
>> - (patch verified) calling mca_base_param_lookup_string after mca_base_param_reg_string is unnecessary. The call to mca_base_param_lookup_string causes the value returned by mca_base_param_reg_string to be leaked.
>> - Need to free mca_coll_ml_component.config_file_name on component close.
>>
>> btl/openib:
>> - calling mca_base_param_lookup_string after mca_base_param_reg_string is unnecessary. The call to mca_base_param_lookup_string causes the value returned by mca_base_param_reg_string to be leaked.
>>
>> vprotocol/base:
>> - There was no way for pml/v to determine if vprotocol took ownership of vprotocol_include_list. Fix by always never ownership (use strdup).
>>
>> mca/base:
>> - param_lookup will result in storage->stringval to be a newly allocated string if the mca parameter has a string value. ensure this string is always freed.
>>
>>
>> When: This is a simple patch. Timeout set for tomorrow @ 12:00 PM MST
>>
>> Why: Always a good idea to clean up all allocated memory. With this patch and some others I have in the pipeline valgrind no longer reports and "possibly leaked" or "definitely leaked" blocks in ompi_info.
>>
>>
>> -Nathan Hjelm
>> HPC-3, LANL
>> <ompi_leaks.patch>_______________________________________________
>> devel mailing list
>> devel_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>
>
> --
> Jeff Squyres
> jsquyres_at_[hidden]
> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel