diff --git a/CHANGELOG.md b/CHANGELOG.md index 89afa174910f..c404edb308a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/tasks/tasks.hpp b/src/tasks/tasks.hpp index 21c85c317c79..91b9e103d6aa 100644 --- a/src/tasks/tasks.hpp +++ b/src/tasks/tasks.hpp @@ -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