Skip to content

Commit

Permalink
Merge pull request #1152 from parthenon-hpc-lab/dempsey/task_demangle
Browse files Browse the repository at this point in the history
Bugfix: Fix memory leak
  • Loading branch information
Yurlungur authored Aug 11, 2024
2 parents 5e42a4f + 3bd6036 commit b73dfc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit b73dfc5

Please sign in to comment.