diff --git a/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp b/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp index a8314d804331d..dd5a257e39855 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp +++ b/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp @@ -16,6 +16,7 @@ // RUN: FileCheck %s -input-file=%t.process_syslog_output.txt #include #include +#include #include const int kBufferSize = 512; @@ -37,6 +38,7 @@ void readOne() { int main() { buffer = static_cast(malloc(kBufferSize)); + memset(static_cast(buffer), static_cast('.'), kBufferSize); assert(buffer); // Deliberately poison `buffer` so that we have a deterministic way // triggering two ASan reports in a row in the no halt_on_error mode (e.g. Two