[PATCH] D83372: Fix for memory leak reported by Valgrind
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 10:23:56 PDT 2020
beanz added a comment.
In D83372#2172411 <https://reviews.llvm.org/D83372#2172411>, @lattner wrote:
> What happens when someone creates a new managed static after this? This should work. Can you reset the `mutex_init_flag` somehow?
I think there may be issues beyond just this change that would prevent LLVM from functioning after llvm_shutdown is called. I wouldn't expect this change to make that suddenly work.
In terms of making the flag resettable, it would have to stop using llvm::once_flag. llvm::once_flag is an llvm implementation of std::once_flag for platforms that don't have the std version, and the std version is not resettable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83372/new/
https://reviews.llvm.org/D83372
More information about the llvm-commits
mailing list