[PATCH] D29955: Allow externally dlopen-ed libraries to be registered as permanent libraries.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 14:50:18 PST 2017


vsk added a comment.

- Can you add a private `addPermanentLibraryWithLock(void *handle, SmartScopedLock &)` method? You can then use this from {add,get}PermanentLibrary, to avoid acquiring the mutex multiple times. That kills the benign race where two clients try to add the same dylib in parallel calls to getPermanentLibrary.
- Could you rebase this patch on https://reviews.llvm.org/D30178 once it's updated?

As a general note (unrelated to this patch), I'm a bit unhappy with how there is no clear thing that SymbolMutex guards, but we don't have to fix that here.


https://reviews.llvm.org/D29955





More information about the llvm-commits mailing list