-
Notifications
You must be signed in to change notification settings - Fork 936
Fixing memory leaks as reported by valgrind #8747
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
Fixing memory leaks as reported by valgrind #8747
Conversation
Applying fixes from open-mpi#8217 These are not my changes, but I'm trying to incorporate them from the v4.0.x PR open-mpi#8217. Signed-off-by: Geoffrey Paulsen <gpaulsen@us.ibm.com>
On RHEL 8.3, the version of clang-format that Redhat provides is: > clang-format --version clang-format version 10.0.1 (Red Hat 10.0.1-1.module+el8.3.0+7459+90c24896) > git --version git v2.27.0 I tried to fix up master PR open-mpi#8747 (master version of 8723) with the command: `git clang-format -v HEAD~1` but ran into some issues with clang-format v10.0.1 being able to parse the .clang-format file. I did not spend much time trying to find viable alternatives, instead I would just remove the offending line in the .clang-format file and rince/repeat. Are these options that we could do without, so that we could run clang-format with both v10 and v11? Signed-off-by: Geoffrey Paulsen <gpaulsen@us.ibm.com>
These are not my changes, but I'm trying to incorporate them from the v4.0.x PR open-mpi#8217. v4.0.x version of master PR open-mpi#8747 Not a cherry-pick (includes orte and openib changes) Signed-off-by: Geoffrey Paulsen gpaulsen@us.ibm.com
These are not my changes, but I'm trying to incorporate them from the v4.0.x PR open-mpi#8217. v4.0.x version of master PR open-mpi#8747 Cherry-picked from the v4.0.x version, since master is missing a few of these files. Signed-off-by: Geoffrey Paulsen gpaulsen@us.ibm.com (cherry picked from commit 3a243ac)
These are not my changes, but I'm trying to incorporate them from the v4.0.x PR open-mpi#8217. v4.1.x version of master PR open-mpi#8747 Cherry-picked from the v4.0.x version, since master is missing a few of these files. Signed-off-by: Geoffrey Paulsen gpaulsen@us.ibm.com (cherry picked from commit 3a243ac)
awlauria
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the line number references? They will get stale real quick.
| { | ||
| if( ! mca_common_monitoring_enabled || /* Don't release if not last */ | ||
| 0 < opal_atomic_sub_fetch_32(&mca_common_monitoring_hold, 1) ) return; | ||
| /* Even if not enabled, this string is allocated at l.310 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.310?
| if (!mca_common_monitoring_enabled) { | ||
| if (NULL != mca_common_monitoring_current_filename) { | ||
| free(mca_common_monitoring_current_filename); | ||
| mca_common_monitoring_current_filename = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this file closed?
| free(ompi_mtl_ofi.comm_to_context); | ||
| free(ompi_mtl_ofi.ofi_ctxt); | ||
|
|
||
| /* This was strdup()ed at L.714 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is 1024. but having line numbers is always dicey. I'd say remove the line reference.
| hp->page_size, hp->path, hp->mmap_flags); | ||
| OBJ_RELEASE(hp); | ||
| } | ||
| OBJ_RELEASE(hp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like hp->path is leaked on line 274.
On RHEL 8.3, the version of clang-format that Redhat provides is: > clang-format --version clang-format version 10.0.1 (Red Hat 10.0.1-1.module+el8.3.0+7459+90c24896) > git --version git v2.27.0 I tried to fix up master PR open-mpi#8747 (master version of 8723) with the command: `git clang-format -v HEAD~1` but ran into some issues with clang-format v10.0.1 being able to parse the .clang-format file. I did not spend much time trying to find viable alternatives, instead I would just remove the offending line in the .clang-format file and rince/repeat. Are these options that we could do without, so that we could run clang-format with both v10 and v11? Signed-off-by: Geoffrey Paulsen <gpaulsen@us.ibm.com> (cherry picked from commit 2a0f095)
|
@gpaulsen why close this? At the very least we can get it into master/v5.0.x |
Applying fixes from #8217
These are not my changes, but I'm trying to incorporate them
from the v4.0.x PR #8217.
Signed-off-by: Geoffrey Paulsen gpaulsen@us.ibm.com