Skip to content

[v5.0.x] MPI_Info_dup: allocate info through ompi_info_allocate instead of OBJ_NEW #10420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2022

Conversation

devreal
Copy link
Contributor

@devreal devreal commented May 23, 2022

The call to ompi_info_allocate ensures that the ompi instance is properly retained (similar to MPI_Info_create). The instance is then released in MPI_Info_free.

Thanks to Lisandro Dalcin for reporting and providing a simple reproducer (see #10344 (comment))

Backport of #10349 to v5.0.x

Signed-off-by: Joseph Schuchart schuchart@icl.utk.edu

devreal added 2 commits May 23, 2022 15:05
…_NEW

The call to ompi_info_allocate ensures that the ompi instance is properly
retained (similar to MPI_Info_create). The instance is then released in
MPI_Info_free.

Thanks to Lisandro Dalcin for reporting and providing an easy reproducer.

Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
(cherry picked from commit 50d8012)
No need to allocate it on the heap using OBJ_NEW. Also fixes
a mismatch between OBJ_NEW and ompi_info_free that potentially
leads to inconsistencies in ref-counting the ompi instance.

Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
(cherry picked from commit 7ef4f20)
@devreal devreal changed the title [v5.0.xMPI_Info_dup: allocate info through ompi_info_allocate instead of OBJ_NEW [v5.0.x] MPI_Info_dup: allocate info through ompi_info_allocate instead of OBJ_NEW May 23, 2022
@devreal devreal requested a review from bosilca May 23, 2022 19:08
@dalcinl
Copy link
Contributor

dalcinl commented May 24, 2022

@devreal All OK from mpi4py's side [logs].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants