OSDN Git Service

Revert "linker: disable ld.config.txt in ASAN mode"
authorJiyong Park <jiyong@google.com>
Fri, 4 Aug 2017 01:25:46 +0000 (10:25 +0900)
committerJiyong Park <jiyong@google.com>
Fri, 4 Aug 2017 05:15:20 +0000 (14:15 +0900)
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)

linker/linker_config.cpp
linker/tests/linker_config_test.cpp

index 2bdde1e..0a9aeab 100644 (file)
@@ -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;
index 87609d0..c6fade9 100644 (file)
@@ -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);
+}