Skip to content

Commit dad0fb8

Browse files
committed
Some initial valgrind cleanup
Finalize the MCA param subsystem to cleanup the parameter storage. Provide a way to release the pmix_value_t and pmix_data_array_t storage. Ensure we release the pmix_job_t tracker in the gds/hash component when the nspace is deleted. Resolve memory corruption problem associated with passing the HWLOC topology into the PMIx server from the host. This was being copied during the "info_list" processing, and then being deleted when the resulting data array was released - leaving the server to continue accessing the free'd topology tree. Remove an unnecessary "retain" - thanks to Artem Polyakov for spotting it. Cleanup around that to avoid segfault of double release while avoiding leak. Add some missing utility finalize calls Signed-off-by: Ralph Castain <[email protected]>
1 parent c00f97f commit dad0fb8

23 files changed

+779
-388
lines changed

include/pmix.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,8 @@ PMIX_EXPORT pmix_status_t PMIx_Parse_cpuset_string(const char *cpuset_string,
10871087

10881088
PMIX_EXPORT pmix_status_t PMIx_Get_cpuset(pmix_cpuset_t *cpuset, pmix_bind_envelope_t ref);
10891089

1090+
PMIX_EXPORT void PMIx_Cpuset_destruct(pmix_cpuset_t *cpuset);
1091+
10901092
/* Get the relative locality of two local processes given their locality strings.
10911093
*
10921094
* locality1 - String returned by the PMIx_server_generate_locality_string API
@@ -1580,6 +1582,8 @@ PMIX_EXPORT pmix_status_t PMIx_Value_unload(pmix_value_t *val,
15801582
void **data,
15811583
size_t *sz);
15821584

1585+
PMIX_EXPORT void PMIx_Value_destruct(pmix_value_t *val);
1586+
15831587
/* Transfer data from one pmix_value_t to another - this is actually
15841588
* executed as a COPY operation, so the original data is not altered.
15851589
*/
@@ -1590,6 +1594,8 @@ PMIX_EXPORT pmix_status_t PMIx_Value_xfer(pmix_value_t *dest,
15901594
PMIX_EXPORT pmix_value_cmp_t PMIx_Value_compare(pmix_value_t *v1,
15911595
pmix_value_t *v2);
15921596

1597+
PMIX_EXPORT void PMIx_Data_array_destruct(pmix_data_array_t *d);
1598+
15931599
/* Load key/value data into a pmix_info_t struct. Note that this
15941600
* effectively is a PMIX_LOAD_KEY operation to copy the key,
15951601
* followed by a PMIx_Value_load to COPY the data into the
@@ -1623,6 +1629,8 @@ PMIX_EXPORT pmix_status_t PMIx_Info_list_add(void *ptr,
16231629
const void *value,
16241630
pmix_data_type_t type);
16251631

1632+
PMIX_EXPORT pmix_status_t PMIx_Info_list_insert(void *ptr, pmix_info_t *info);
1633+
16261634
/* Transfer the data in an existing pmix_info_t struct to a list. This
16271635
* is executed as a COPY operation, so the original data is not altered.
16281636
* The "ptr" passed here is the pointer returned by PMIx_Info_list_start

0 commit comments

Comments
 (0)