diff --git a/linker/dlfcn.cpp b/linker/dlfcn.cpp index 228e30a1a..ec6850a40 100644 --- a/linker/dlfcn.cpp +++ b/linker/dlfcn.cpp @@ -279,10 +279,12 @@ bool __loader_android_link_namespaces_all_libs(android_namespace_t* namespace_fr } android_namespace_t* __loader_android_get_exported_namespace(const char* name) { + ScopedPthreadMutexLocker locker(&g_dl_mutex); return get_exported_namespace(name); } void __loader_cfi_fail(uint64_t CallSiteTypeId, void* Ptr, void *DiagData, void *CallerPc) { + ScopedPthreadMutexLocker locker(&g_dl_mutex); CFIShadowWriter::CfiFail(CallSiteTypeId, Ptr, DiagData, CallerPc); }