summaryrefslogtreecommitdiffstats
path: root/libnativeloader
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2017-02-06 21:05:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-02-06 21:05:02 +0000
commit6b7425881860c7b16d4228a27ed2b2119aba0bda (patch)
treeb011d0a9120746304c86c63796f4ef0687368124 /libnativeloader
parent279cb8b39aeda9e8642a52794e6e67aa84fa2af7 (diff)
parent15a264e65c0df7574f2e8f2406ee6427b084cfff (diff)
downloadcore-6b7425881860c7b16d4228a27ed2b2119aba0bda.tar.gz
core-6b7425881860c7b16d4228a27ed2b2119aba0bda.tar.bz2
core-6b7425881860c7b16d4228a27ed2b2119aba0bda.zip
Merge "Log errors from loading public libraries"
Diffstat (limited to 'libnativeloader')
-rw-r--r--libnativeloader/native_loader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp
index d7b5cb566..2f23c2c97 100644
--- a/libnativeloader/native_loader.cpp
+++ b/libnativeloader/native_loader.cpp
@@ -246,7 +246,9 @@ class LibraryNamespaces {
// For now we rely on CTS test to catch things like this but
// it should probably be addressed in the future.
for (const auto& soname : sonames) {
- dlopen(soname.c_str(), RTLD_NOW | RTLD_NODELETE);
+ LOG_ALWAYS_FATAL_IF(dlopen(soname.c_str(), RTLD_NOW | RTLD_NODELETE) == nullptr,
+ "Error preloading public library %s: %s",
+ soname.c_str(), dlerror());
}
public_libraries_ = base::Join(sonames, ':');