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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- [[PR 1004]](https://github.com/parthenon-hpc-lab/parthenon/pull/1004) Allow parameter modification from an input file for restarts

### Fixed (not changing behavior/API/variables/...)
- [[PR 1152]](https://github.com/parthenon-hpc-lab/parthenon/pull/1152) Fix memory leak in task graph outputs related to `abi::__cxa_demangle`
- [[PR 1146]](https://github.com/parthenon-hpc-lab/parthenon/pull/1146) Fix an issue outputting >4GB single variables per rank
- [[PR 1144]](https://github.com/parthenon-hpc-lab/parthenon/pull/1144) Fix some restarts w/non-CC fields
- [[PR 1132]](https://github.com/parthenon-hpc-lab/parthenon/pull/1132) Fix regional dependencies for iterative task lists and make solvers work for arbirtrary MeshData partitioning
Expand Down
6 changes: 4 additions & 2 deletions src/tasks/tasks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,10 @@ class TaskList {
if (!label.has_value()) label = "anon";
#ifdef HAS_CXX_ABI
int status;
auto signature =
std::string(abi::__cxa_demangle(typeid(F).name(), NULL, NULL, &status));
// _cxa_demangle calls malloc so we must call free
char *signature_name = abi::__cxa_demangle(typeid(F).name(), NULL, NULL, &status);
auto signature = std::string(signature_name);
std::free(signature_name);
#else
std::string signature = " (...)";
#endif
Expand Down
Loading