aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2017-08-04 10:25:46 +0900
committerJiyong Park <jiyong@google.com>2017-08-04 14:15:20 +0900
commitf1e5dbd1cc861f7f4dbf49f4528975bd0d6888ad (patch)
tree5ffada10aa1ebbc8fb429da4192e8f2884b355f2
parent34a4acd801fbd401fcc3c62928effac7b161b1d8 (diff)
downloadbionic-f1e5dbd1cc861f7f4dbf49f4528975bd0d6888ad.tar.gz
Revert "linker: disable ld.config.txt in ASAN mode"
This reverts commit 81b175747d2c7831c010e7e94a6f2572d6dfe437. Reason: 02586a2a34e6acfccf359b94db840f422b6c0231 fixed the bug that prevented us from using LD_PRELOAD with multiple namespaces. Bug: 38114603 Test: 1. ./external/compiler-rt/lib/asan/scripts/asan_device_setup --lib prebuilts/clang/host/linux-x86/clang-stable/lib64/clang/5.0/lib/linux 2. enable talkback shortcut 3. in the home screen, hold vol-up/down together 4. device does not reboots and talkback shortcut is toggled Test: bionic-unit-tests and linker-unit-tests successful Merged-In: I25a05927ffbb28b9fa72303652893f43918ccec6 Change-Id: Ib7568d65c2524fd2307d01eb3d50fc308feced9c (cherry picked from commit 6ab40bbf537d45b171f4830cfa6d82949d4cb258)
-rw-r--r--linker/linker_config.cpp9
-rw-r--r--linker/tests/linker_config_test.cpp7
2 files changed, 3 insertions, 13 deletions
diff --git a/linker/linker_config.cpp b/linker/linker_config.cpp
index 2bdde1e6e..0a9aeab2a 100644
--- a/linker/linker_config.cpp
+++ b/linker/linker_config.cpp
@@ -371,15 +371,6 @@ bool Config::read_binary_config(const char* ld_config_file_path,
bool is_asan,
const Config** config,
std::string* error_msg) {
- // TODO(b/38114603) Currently, multiple namespaces does not support ASAN mode
- // where some symbols should be intercepted via LD_PRELOAD; LD_PRELOADed libs
- // are not being preloaded into the linked namespaces other than the default
- // namespace. Until we fix the problem, we temporarily disable ld.config.txt
- // in ASAN mode.
- if (is_asan) {
- return false;
- }
-
g_config.clear();
std::unordered_map<std::string, PropertyValue> property_map;
diff --git a/linker/tests/linker_config_test.cpp b/linker/tests/linker_config_test.cpp
index 87609d095..c6fade913 100644
--- a/linker/tests/linker_config_test.cpp
+++ b/linker/tests/linker_config_test.cpp
@@ -168,7 +168,6 @@ TEST(linker_config, smoke) {
run_linker_config_smoke_test(false);
}
-// TODO(b/38114603) revive this test when ld.config.txt is enabled for ASAN mode
-//TEST(linker_config, asan_smoke) {
-// run_linker_config_smoke_test(true);
-//}
+TEST(linker_config, asan_smoke) {
+ run_linker_config_smoke_test(true);
+}