Skip to content

Commit cc4f323

Browse files
committed
FreeBSD: TSan: main thread finished with ignores enabled
Disabling several TSan tests that are failing due to a bug in the thread sanitizer. TSan appears to be setting the thread to ignored in the `thr_exit` interceptor, and then immediately checking that the thread isn't being ignored, and dying. ``` ThreadSanitizer: main thread finished with ignores enabled One of the following ignores was not ended (in order of probability) ``` rdar://158450231
1 parent d68d62d commit cc4f323

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

test/Sanitizers/tsan/async_taskgroup_next.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
// REQUIRES: tsan_runtime
77
// UNSUPPORTED: use_os_stdlib
88

9+
// Bug in TSan on FreeBSD
10+
// Thread destruction interceptor marks the thread ignored and then checks that
11+
// the thread isn't being ignored.
12+
// rdar://158450231
13+
// XFAIL: OS=freebsd
14+
915
var scratchBuffer: UnsafeMutableBufferPointer<Int> = .allocate(capacity: 1000)
1016

1117
@available(SwiftStdlib 5.1, *)

test/Sanitizers/tsan/basic_future.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
// REQUIRES: tsan_runtime
77
// UNSUPPORTED: use_os_stdlib
88

9+
// Bug in TSan on FreeBSD
10+
// Thread destruction interceptor marks the thread ignored and then checks that
11+
// the thread isn't being ignored.
12+
// rdar://158450231
13+
// XFAIL: OS=freebsd
14+
915
import Dispatch
1016

1117
#if canImport(Darwin)

test/Sanitizers/tsan/mainactor.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
// UNSUPPORTED: use_os_stdlib
88
// UNSUPPORTED: threading_none
99

10+
// Bug in TSan on FreeBSD
11+
// Thread destruction interceptor marks the thread ignored and then checks that
12+
// the thread isn't being ignored.
13+
// rdar://158450231
14+
// XFAIL: OS=freebsd
15+
1016
import Dispatch
1117

1218
/// @returns true iff the expected answer is actually the case, i.e., correct.

test/Sanitizers/tsan/norace-task-group-cancellation.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
// UNSUPPORTED: back_deployment_runtime
88
// UNSUPPORTED: use_os_stdlib
99

10+
// Bug in TSan on FreeBSD
11+
// Thread destruction interceptor marks the thread ignored and then checks that
12+
// the thread isn't being ignored.
13+
// rdar://158450231
14+
// XFAIL: OS=freebsd
15+
1016
@main
1117
public struct TSANDataRaceOnCancel {
1218
public static func main() async throws {

validation-test/Sanitizers/tsan-inout.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
// REQUIRES: stress_test
99
// REQUIRES: tsan_runtime
1010

11+
// Bug in TSan on FreeBSD
12+
// Thread destruction interceptor marks the thread ignored and then checks that
13+
// the thread isn't being ignored.
14+
// rdar://158450231
15+
// XFAIL: OS=freebsd
16+
1117
// Test ThreadSanitizer execution end-to-end when calling
1218
// an uninstrumented module with inout parameters
1319

0 commit comments

Comments
 (0)