1 #include <async_safe/log.h> 2 #include <stdarg.h> 3 #include <unistd.h> 4 5 #include "gwp_asan/optional/printf.h" 6 7 namespace { PrintfWrapper(const char * Format,...)8void PrintfWrapper(const char *Format, ...) { 9 va_list List; 10 va_start(List, Format); 11 async_safe_fatal_va_list("GWP-ASan", Format, List); 12 va_end(List); 13 } 14 } // anonymous namespace 15 16 namespace gwp_asan { 17 namespace test { 18 // Android version of the Printf() function for use in gwp_asan_unittest. You 19 // can find the declaration of this function in gwp_asan/optional/printf.h getPrintfFunction()20Printf_t getPrintfFunction() { return PrintfWrapper; } 21 } // namespace test 22 } // namespace gwp_asan 23