Print markers to stderr to avoid races with sanitizer output
* c-c++-common/asan/swapcontext-test-1.c, * c-c++-common/tsan/thread_leak.c, * g++.dg/tsan/aligned_vs_unaligned_race.C, * g++.dg/tsan/benign_race.C, * g++.dg/tsan/fd_close_norace.C, * g++.dg/tsan/fd_close_norace2.C: Print markers to stderr to avoid races with sanitizer output From-SVN: r233899
This commit is contained in:
parent
37d9822023
commit
7c65bd5682
@ -1,3 +1,13 @@
|
||||
2016-03-02 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
|
||||
|
||||
* c-c++-common/asan/swapcontext-test-1.c,
|
||||
* c-c++-common/tsan/thread_leak.c,
|
||||
* g++.dg/tsan/aligned_vs_unaligned_race.C,
|
||||
* g++.dg/tsan/benign_race.C,
|
||||
* g++.dg/tsan/fd_close_norace.C,
|
||||
* g++.dg/tsan/fd_close_norace2.C: Print markers to stderr to avoid
|
||||
races with sanitizer output
|
||||
|
||||
2016-03-02 Richard Biener <rguenther@suse.de>
|
||||
Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
|
@ -52,9 +52,9 @@ volatile int zero = 0;
|
||||
int main(int argc, char **argv) {
|
||||
int ret = 0;
|
||||
ret += Run(zero, 0);
|
||||
printf("Test1 passed\n");
|
||||
fprintf(stderr, "Test1 passed\n");
|
||||
ret += Run(zero, 1);
|
||||
printf("Test2 passed\n");
|
||||
fprintf(stderr, "Test2 passed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ int main() {
|
||||
pthread_t t;
|
||||
pthread_create(&t, 0, Thread, 0);
|
||||
pthread_join(t, 0);
|
||||
printf("PASS\n");
|
||||
fprintf(stderr, "PASS\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ int main() {
|
||||
pthread_create(&t[1], NULL, Thread2, NULL);
|
||||
pthread_join(t[0], NULL);
|
||||
pthread_join(t[1], NULL);
|
||||
printf("Pass\n");
|
||||
fprintf(stderr, "Pass\n");
|
||||
/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
|
||||
/* { dg-output "Pass.*" } */
|
||||
return 0;
|
||||
|
@ -32,7 +32,7 @@ int main() {
|
||||
Global = 43;
|
||||
WTFGlobal = 143;
|
||||
pthread_join(t, 0);
|
||||
printf("OK\n");
|
||||
fprintf(stderr, "OK\n");
|
||||
}
|
||||
|
||||
/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
|
||||
|
@ -24,7 +24,7 @@ int main() {
|
||||
pthread_create(&t[1], NULL, Thread2, NULL);
|
||||
pthread_join(t[0], NULL);
|
||||
pthread_join(t[1], NULL);
|
||||
printf("OK\n");
|
||||
fprintf(stderr, "OK\n");
|
||||
}
|
||||
|
||||
/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
|
||||
|
@ -22,7 +22,7 @@ int main() {
|
||||
while (write(pipes[1], &t, 1) != 1) {
|
||||
}
|
||||
pthread_join(t, 0);
|
||||
printf("OK\n");
|
||||
fprintf(stderr, "OK\n");
|
||||
}
|
||||
|
||||
/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
|
||||
|
Loading…
Reference in New Issue
Block a user