[PATCH] D30107: Refactor DynamicLibrary so searching for a symbol will have a defined order and libraries are properly unloaded when llvm_shutdown is called.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 14:58:28 PDT 2017
efriedma added inline comments.
================
Comment at: llvm/trunk/include/llvm/Support/DynamicLibrary.h:61
/// This function permanently loads the dynamic library at the given path.
- /// The library will only be unloaded when the program terminates.
+ /// The library will only be unloaded when llvm_shutdown() is called.
/// This returns a valid DynamicLibrary instance on success and an invalid
----------------
Is this change necessary? I don't see any discussion of this in the review.
In addition to being used by the JIT, this API is used to load plugins, and unloading a plugin during llvm_shutdown() can cause a segfault, depending on the order globals get destroyed.
Repository:
rL LLVM
https://reviews.llvm.org/D30107
More information about the llvm-commits
mailing list