Skip to content
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

Bugfix: Fix memory leak #1152

Merged
merged 2 commits into from
Aug 11, 2024
Merged

Bugfix: Fix memory leak #1152

merged 2 commits into from
Aug 11, 2024

Conversation

adamdempsey90
Copy link
Collaborator

PR Summary

Testing in a downstream code caught a bad memory leak related to the tasks that would eventually crash the node. I tracked this down to the use of abi::__cxa_demangle for the task graph output machinery. abi::__cxa_demangle for one reason or another explicitly calls malloc for the name it returns. So we have to call free on the name after it's used.

I can confirm that this change fixes the memory leak.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

Copy link
Collaborator

@pdmullen pdmullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy cow I cannot believe you were able to track this down...

Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow nice catch!

@Yurlungur Yurlungur merged commit b73dfc5 into develop Aug 11, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants