Skip to content

Commit 406478e

Browse files
committed
---
yaml --- r: 347612 b: refs/heads/master c: c29b679 h: refs/heads/master
1 parent 3b28285 commit 406478e

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d1e6a66916b5267ba2616fad8b93ec950b58be7f
2+
refs/heads/master: c29b679a7c871ede3ed86124da9c1428369ca93a
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/IRGen/IRGenSIL.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,10 +1222,7 @@ IRGenSILFunction::IRGenSILFunction(IRGenModule &IGM, SILFunction *f)
12221222
CurFn->addFnAttr(llvm::Attribute::SanitizeAddress);
12231223
if (IGM.IRGen.Opts.Sanitizers & SanitizerKind::Thread) {
12241224
auto declContext = f->getDeclContext();
1225-
if (f->getLoweredFunctionType()->isCoroutine()) {
1226-
// Disable TSan in coroutines; the instrumentation currently interferes
1227-
// with coroutine structural invariants.
1228-
} else if (declContext && isa<DestructorDecl>(declContext)) {
1225+
if (declContext && isa<DestructorDecl>(declContext)) {
12291226
// Do not report races in deinit and anything called from it
12301227
// because TSan does not observe synchronization between retain
12311228
// count dropping to '0' and the object deinitialization.

trunk/test/IRGen/tsan-attributes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test verifies that we add the function attributes used by TSan.
22

3-
// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -sanitize=thread %s | %FileCheck %s -check-prefix=TSAN
3+
// RUN: %target-swift-frontend -emit-ir -sanitize=thread %s | %FileCheck %s -check-prefix=TSAN
44

55
// TSan is currently only supported on 64 bit mac and simulators.
66
// (We do not test the simulators here.)
@@ -22,5 +22,5 @@ public var x: Int {
2222
// TSAN-SAME: }
2323

2424
// TSAN: attributes [[COROUTINE_ATTRS]] =
25-
// TSAN-NOT: sanitize_address
25+
// TSAN-SAME: sanitize_thread
2626
// TSAN-SAME: }

0 commit comments

Comments
 (0)