diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/setvbuf.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/setvbuf.cpp index b7bcdf15499d2..3c47285303115 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Posix/setvbuf.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/setvbuf.cpp @@ -14,7 +14,7 @@ void print_one_byte(char *buf) { } void test_setbuf() { - char buf[BUFSIZ]; + static char buf[BUFSIZ]; setbuf(stdout, NULL); @@ -30,7 +30,7 @@ void test_setbuf() { } void test_setbuffer() { - char buf[BUFSIZ]; + static char buf[BUFSIZ]; setbuffer(stdout, NULL, 0); @@ -54,7 +54,7 @@ void test_setlinebuf() { } void test_setvbuf() { - char buf[BUFSIZ]; + static char buf[BUFSIZ]; setvbuf(stdout, NULL, _IONBF, 0);