From 954adcc5411e9236583fd8dbe1d141b54d28a376 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Wed, 25 Jul 2018 18:13:44 -0700 Subject: [PATCH] adbd: turn on fdsan warnings. Test: mma Test: python test_device.py Change-Id: Ic90fac0b731b0aa9fa934f4472b0c40f1263c340 --- adb/daemon/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/adb/daemon/main.cpp b/adb/daemon/main.cpp index c02cafab7..f6f1acc31 100644 --- a/adb/daemon/main.cpp +++ b/adb/daemon/main.cpp @@ -18,6 +18,7 @@ #include "sysdeps.h" +#include #include #include #include @@ -177,6 +178,11 @@ int adbd_main(int server_port) { signal(SIGPIPE, SIG_IGN); + auto fdsan_level = android_fdsan_get_error_level(); + if (fdsan_level == ANDROID_FDSAN_ERROR_LEVEL_DISABLED) { + android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_WARN_ONCE); + } + init_transport_registration(); // We need to call this even if auth isn't enabled because the file