diff options
author | dimitry <dimitry@google.com> | 2017-10-23 15:10:10 +0200 |
---|---|---|
committer | dimitry <dimitry@google.com> | 2017-10-23 15:14:01 +0200 |
commit | 8db36a51ff66c6849d355d8cb65142c0dcf7e1bc (patch) | |
tree | 1f373f1ec1ded07544e5b6ca03d8c1201803bb31 /linker/linker.cpp | |
parent | 8f348a0cce048fc929b4ce0b850147cd7c737497 (diff) |
linker: fix error message for inaccessible libs
Added a test to make sure linker produces correct error message
when user attempts to load a library in a linked namespace and fails.
Bug: http://b/67866190
Bug: http://b/64950640
Bug: http://b/64888291
Test: bionic-unit-test --gtest_filter=dlext*
Change-Id: I5b5c2070d1388eff123118350b2b5c8fc7571a29
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index ec92c9205..5f906c87a 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -1433,6 +1433,8 @@ static bool find_library_internal(android_namespace_t* ns, if (search_linked_namespaces) { // if a library was not found - look into linked namespaces + // preserve current dlerror in the case it fails. + DlErrorRestorer dlerror_restorer; for (auto& linked_namespace : ns->linked_namespaces()) { if (find_library_in_linked_namespace(linked_namespace, task)) { |