Workaround ASAN false positive
There is a known ASAN false positive case. If a part of the application
is built with asan and another part is not instrumented, and both parts
use e.g. instrumented std::vector, asan may report non-existent
container overflow. This happens because instrumented and
non-instrumented bits of std::vector, inlined and not, are mixed during
linking, so you end up with incompletely instrumented std::vector.
https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow
Workaround the issue by statically linking in libbase, thus its code also
becomes instrumented.
Test: Run resolv_integration_test
Bug: 139838864
Bug: 131328001
Change-Id: I9fe0fcb57016273e505810345162ce6c55565381
Exempt-From-Owner-Approval: Fix build breakage, no functionality change.
diff --git a/Android.bp b/Android.bp
index 059fa86..334522e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -164,15 +164,16 @@
],
shared_libs: [
"libbpf_android",
- "libbase",
"libbinder",
"libcrypto",
+ "liblog",
"libnetd_client",
"libssl",
"libutils",
],
static_libs: [
"dnsresolver_aidl_interface-cpp",
+ "libbase",
"libgmock",
"libnetd_test_dnsresponder",
"libnetd_test_metrics_listener",