diff --git a/compiler-rt/test/sanitizer_common/TestCases/onprint.cpp b/compiler-rt/test/sanitizer_common/TestCases/onprint.cpp --- a/compiler-rt/test/sanitizer_common/TestCases/onprint.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/onprint.cpp @@ -26,7 +26,7 @@ int main(int argc, char *argv[]) { assert(argc >= 2); - f = open(argv[1], O_WRONLY); + f = open(argv[1], O_CREAT | O_WRONLY, 0666); // Use-after-free to trigger ASan/TSan reports. void *ptr = malloc(1);