Loading adb/client/main.cpp +10 −0 Original line number Original line Diff line number Diff line Loading @@ -75,6 +75,11 @@ void adb_server_cleanup() { usb_cleanup(); usb_cleanup(); } } static void intentionally_leak() { void* p = ::operator new(1); LOG(INFO) << "leaking pointer " << p; } int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply_fd) { int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply_fd) { #if defined(_WIN32) #if defined(_WIN32) // adb start-server starts us up with stdout and stderr hooked up to // adb start-server starts us up with stdout and stderr hooked up to Loading @@ -98,6 +103,11 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply }); }); #endif #endif char* leak = getenv("ADB_LEAK"); if (leak && strcmp(leak, "1") == 0) { intentionally_leak(); } if (is_daemon) { if (is_daemon) { close_stdin(); close_stdin(); setup_daemon_logging(); setup_daemon_logging(); Loading Loading
adb/client/main.cpp +10 −0 Original line number Original line Diff line number Diff line Loading @@ -75,6 +75,11 @@ void adb_server_cleanup() { usb_cleanup(); usb_cleanup(); } } static void intentionally_leak() { void* p = ::operator new(1); LOG(INFO) << "leaking pointer " << p; } int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply_fd) { int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply_fd) { #if defined(_WIN32) #if defined(_WIN32) // adb start-server starts us up with stdout and stderr hooked up to // adb start-server starts us up with stdout and stderr hooked up to Loading @@ -98,6 +103,11 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply }); }); #endif #endif char* leak = getenv("ADB_LEAK"); if (leak && strcmp(leak, "1") == 0) { intentionally_leak(); } if (is_daemon) { if (is_daemon) { close_stdin(); close_stdin(); setup_daemon_logging(); setup_daemon_logging(); Loading