Skip to content

Commit 463c6e4

Browse files
authored
Merge pull request #8953 from devincoughlin/tsan-inout-robustify-test
2 parents c6d9fdd + 112c3c6 commit 463c6e4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/Sanitizers/Inputs/tsan-uninstrumented.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ public var computedGlobalInUninstrumentedModule2: Int {
6060
get { return 0 }
6161
set { }
6262
}
63+
64+
public func uninstrumentedBlackHole<T>(_ p: T) { }

test/Sanitizers/tsan-inout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ testRace(name: "InoutAccessToStoredGlobalInUninstrumentedModule",
159159
// the read from the global is IRGen'd to a memcpy().
160160
testRace(name: "ReadAndWriteToStoredGlobalInUninstrumentedModule",
161161
thread: { storedGlobalInUninstrumentedModule2 = 7 },
162-
thread: { _ = storedGlobalInUninstrumentedModule2 } )
162+
thread: { uninstrumentedBlackHole(storedGlobalInUninstrumentedModule2) } )
163163
// CHECK-INTERCEPTORS-ACCESSES-LABEL: Running ReadAndWriteToStoredGlobalInUninstrumentedModule
164164
// CHECK-INTERCEPTORS-ACCESSES: ThreadSanitizer: data race
165165
// CHECK-INTERCEPTORS-ACCESSES: Location is global

0 commit comments

Comments
 (0)