diff options
Diffstat (limited to 'compiler-rt/lib/tsan/go')
-rwxr-xr-x | compiler-rt/lib/tsan/go/buildgo.sh | 2 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/go/test.c | 1 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/go/tsan_go.cc | 3 |
3 files changed, 2 insertions, 4 deletions
diff --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh index 0015b5d60e0..a0d2f6761b4 100755 --- a/compiler-rt/lib/tsan/go/buildgo.sh +++ b/compiler-rt/lib/tsan/go/buildgo.sh @@ -74,5 +74,5 @@ echo as gotsan.s -o race_$SUFFIX.syso as gotsan.s -o race_$SUFFIX.syso gcc test.c race_$SUFFIX.syso -lpthread -o test -./test +TSAN_OPTIONS="exitcode=0" ./test diff --git a/compiler-rt/lib/tsan/go/test.c b/compiler-rt/lib/tsan/go/test.c index 5ef81be96c9..a9a5b3dbfca 100644 --- a/compiler-rt/lib/tsan/go/test.c +++ b/compiler-rt/lib/tsan/go/test.c @@ -46,7 +46,6 @@ int main(void) { __tsan_read(0, buf, 0); __tsan_free(buf); __tsan_func_exit(0); - printf("OK\n"); __tsan_fini(); return 0; } diff --git a/compiler-rt/lib/tsan/go/tsan_go.cc b/compiler-rt/lib/tsan/go/tsan_go.cc index f0e2e456fb6..4b3076c46ce 100644 --- a/compiler-rt/lib/tsan/go/tsan_go.cc +++ b/compiler-rt/lib/tsan/go/tsan_go.cc @@ -165,7 +165,7 @@ void __tsan_acquire(int goid, void *addr) { void __tsan_release(int goid, void *addr) { ThreadState *thr = goroutines[goid]; thr->in_rtl++; - Release(thr, 0, (uptr)addr); + ReleaseStore(thr, 0, (uptr)addr); thr->in_rtl--; } @@ -173,7 +173,6 @@ void __tsan_release_merge(int goid, void *addr) { ThreadState *thr = goroutines[goid]; thr->in_rtl++; Release(thr, 0, (uptr)addr); - //ReleaseMerge(thr, 0, (uptr)addr); thr->in_rtl--; } |