[ubsan][test] FLush stdout before checking interleaved stdout/stderr
authorFangrui Song <i@maskray.me>
Tue, 29 Dec 2020 04:30:31 +0000 (20:30 -0800)
committerFangrui Song <i@maskray.me>
Tue, 29 Dec 2020 04:30:32 +0000 (20:30 -0800)
Detected by musl.

compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp

index c027028..f3b13e3 100644 (file)
@@ -29,6 +29,7 @@ void __ubsan_on_report(void) {
   printf("Issue: %s\n", IssueKind);
   printf("Location: %s:%u:%u\n", Filename, Line, Col);
   printf("Message: %s\n", Message);
+  fflush(stdout);
 
   (void)Addr;
 }