[PATCH] D83372: Fix for memory leak reported by Valgrind

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 10:56:00 PDT 2021


dblaikie accepted this revision.
dblaikie added a comment.

SGTM



================
Comment at: llvm/lib/Support/ManagedStatic.cpp:71-74
 /// llvm_shutdown - Deallocate and destroy all ManagedStatic variables.
+/// IMPORTANT: it's only safe to call llvm_shutdown() in single thread,
+/// without any other threads executing LLVM APIs.
 void llvm::llvm_shutdown() {
----------------
Wouldn't mind some extra clarification that this should be the last use of LLVM APIs in this loaded module (executable/dynamic library) - shutting down and then restarting use of LLVM in the same process is probably not supported/not practical to support so far as I know. (could be wrong though/open to discussion)


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