From: Jiyong Park Date: Fri, 4 Aug 2017 01:25:46 +0000 (+0900) Subject: Revert "linker: disable ld.config.txt in ASAN mode" X-Git-Tag: android-x86-8.1-r1~19^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f1e5dbd1cc861f7f4dbf49f4528975bd0d6888ad;p=android-x86%2Fbionic.git 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) --- 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 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); +}