aboutsummaryrefslogtreecommitdiff
path: root/tests/dlfcn_test.cpp
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2017-10-16 15:31:09 +0900
committerJiyong Park <jiyong@google.com>2017-10-19 15:13:54 +0900
commit01162f24696aedd0f80fde006596bec7786ac684 (patch)
treedf56be16f8b8caffdb1b8ed76ea7634ef7934476 /tests/dlfcn_test.cpp
parent8f57fd41790883ce210866a5a20d77cc910c87ad (diff)
downloadbionic-01162f24696aedd0f80fde006596bec7786ac684.tar.gz
Fix: linker segfault on dlopen of a DF_1_GLOBAL so
Added the missing null check routine. Bug: 67755729 Test: dlfcn.dlopen_df_1_global added and it passes Change-Id: Ibe8db18b0b5a481e2e9937041abef6d6b179dd87
Diffstat (limited to 'tests/dlfcn_test.cpp')
-rw-r--r--tests/dlfcn_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index adc5ee4b1..697b84a42 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -1496,4 +1496,9 @@ TEST(dlfcn, dlopen_invalid_textrels2) {
ASSERT_SUBSTR(expected_dlerror.c_str(), dlerror());
}
+TEST(dlfcn, dlopen_df_1_global) {
+ void* handle = dlopen("libtest_dlopen_df_1_global.so", RTLD_NOW);
+ ASSERT_TRUE(handle != nullptr) << dlerror();
+}
+
#endif