summaryrefslogtreecommitdiffstats
path: root/linker/dlfcn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linker/dlfcn.cpp')
-rw-r--r--linker/dlfcn.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/linker/dlfcn.cpp b/linker/dlfcn.cpp
index 8fafded..8705d9a 100644
--- a/linker/dlfcn.cpp
+++ b/linker/dlfcn.cpp
@@ -158,6 +158,8 @@ int dlclose(void* handle) {
}
void android_set_application_target_sdk_version(uint32_t target) {
+ // lock to avoid modification in the middle of dlopen.
+ ScopedPthreadMutexLocker locker(&g_dl_mutex);
set_application_target_sdk_version(target);
}