@@ -80,31 +80,31 @@ testRace(name: "GlobalStructMutatingMethod",
80
80
thread: { _ = globalForGlobalStructMutatingMethod. read ( ) } ,
81
81
thread: { globalForGlobalStructMutatingMethod. mutate ( ) } )
82
82
// CHECK-LABEL: Running GlobalStructMutatingMethod
83
- // CHECK: ThreadSanitizer: data race
83
+ // CHECK: ThreadSanitizer: Swift access race
84
84
// CHECK: Location is global
85
85
86
86
var globalForGlobalStructDifferentStoredPropertiesInout = UninstrumentedStruct ( )
87
87
testRace ( name: " GlobalStructDifferentStoredPropertiesInout " ,
88
88
thread: { uninstrumentedTakesInout ( & globalForGlobalStructDifferentStoredPropertiesInout. storedProperty1) } ,
89
89
thread: { uninstrumentedTakesInout ( & globalForGlobalStructDifferentStoredPropertiesInout. storedProperty2) } )
90
90
// CHECK-LABEL: Running GlobalStructDifferentStoredPropertiesInout
91
- // CHECK: ThreadSanitizer: data race
91
+ // CHECK: ThreadSanitizer: Swift access race
92
92
// CHECK: Location is global
93
93
94
94
var globalForGlobalStructSameStoredPropertyInout = UninstrumentedStruct ( )
95
95
testRace ( name: " GlobalStructSameStoredPropertyInout " ,
96
96
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSameStoredPropertyInout. storedProperty1) } ,
97
97
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSameStoredPropertyInout. storedProperty1) } )
98
98
// CHECK-LABEL: Running GlobalStructSameStoredPropertyInout
99
- // CHECK: ThreadSanitizer: data race
99
+ // CHECK: ThreadSanitizer: Swift access race
100
100
101
101
102
102
var globalForGlobalStructSubscriptDifferentIndexesInout = UninstrumentedStruct ( )
103
103
testRace ( name: " GlobalStructSubscriptDifferentIndexesInout " ,
104
104
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSubscriptDifferentIndexesInout[ 0 ] ) } ,
105
105
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSubscriptDifferentIndexesInout[ 1 ] ) } )
106
106
// CHECK-LABEL: Running GlobalStructSubscriptDifferentIndexes
107
- // CHECK: ThreadSanitizer: data race
107
+ // CHECK: ThreadSanitizer: Swift access race
108
108
// CHECK: Location is global
109
109
110
110
@@ -113,45 +113,45 @@ testRace(name: "GlobalStructSubscriptDifferentIndexesGetSet",
113
113
thread: { _ = globalForGlobalStructSubscriptDifferentIndexesGetSet [ 0 ] } ,
114
114
thread: { globalForGlobalStructSubscriptDifferentIndexesGetSet [ 1 ] = 12 } )
115
115
// CHECK-LABEL: Running GlobalStructSubscriptDifferentIndexesGetSet
116
- // CHECK: ThreadSanitizer: data race
116
+ // CHECK: ThreadSanitizer: Swift access race
117
117
// CHECK: Location is global
118
118
119
119
var globalForGlobalClassGeneralMethods = UninstrumentedClass ( )
120
120
testRace ( name: " GlobalClassGeneralMethods " ,
121
121
thread: { _ = globalForGlobalClassGeneralMethods. read ( ) } ,
122
122
thread: { globalForGlobalClassGeneralMethods. mutate ( ) } )
123
123
// CHECK-LABEL: Running GlobalClassGeneralMethods
124
- // CHECK-NOT: ThreadSanitizer: data race
124
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
125
125
126
126
var globalForGlobalClassDifferentStoredPropertiesInout = UninstrumentedClass ( )
127
127
testRace ( name: " GlobalClassDifferentStoredPropertiesInout " ,
128
128
thread: { uninstrumentedTakesInout ( & globalForGlobalClassDifferentStoredPropertiesInout. storedProperty1) } ,
129
129
thread: { uninstrumentedTakesInout ( & globalForGlobalClassDifferentStoredPropertiesInout. storedProperty2) } )
130
130
// CHECK-LABEL: Running GlobalClassDifferentStoredPropertiesInout
131
- // CHECK-NOT: ThreadSanitizer: data race
131
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
132
132
133
133
var globalForGlobalClassSubscriptDifferentIndexesInout = UninstrumentedClass ( )
134
134
testRace ( name: " GlobalClassSubscriptDifferentIndexesInout " ,
135
135
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSubscriptDifferentIndexesInout[ 0 ] ) } ,
136
136
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSubscriptDifferentIndexesInout[ 1 ] ) } )
137
137
// CHECK-LABEL: Running GlobalClassSubscriptDifferentIndexesInout
138
- // CHECK-NOT: ThreadSanitizer: data race
138
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
139
139
140
140
141
141
var globalForGlobalClassSameStoredPropertyInout = UninstrumentedClass ( )
142
142
testRace ( name: " GlobalClassSameStoredPropertyInout " ,
143
143
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSameStoredPropertyInout. storedProperty1) } ,
144
144
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSameStoredPropertyInout. storedProperty1) } )
145
145
// CHECK-LABEL: Running GlobalClassSameStoredPropertyInout
146
- // CHECK: ThreadSanitizer: data race
146
+ // CHECK: ThreadSanitizer: Swift access race
147
147
// CHECK: Location is heap block
148
148
149
149
// These access a global declared in the TSanUninstrumented module
150
150
testRace ( name: " InoutAccessToStoredGlobalInUninstrumentedModule " ,
151
151
thread: { uninstrumentedTakesInout ( & storedGlobalInUninstrumentedModule1) } ,
152
152
thread: { uninstrumentedTakesInout ( & storedGlobalInUninstrumentedModule1) } )
153
153
// CHECK-LABEL: Running InoutAccessToStoredGlobalInUninstrumentedModule
154
- // CHECK: ThreadSanitizer: data race
154
+ // CHECK: ThreadSanitizer: Swift access race
155
155
// CHECK: Location is global
156
156
157
157
// These access a global declared in the TSanUninstrumented module.
@@ -169,14 +169,14 @@ testRace(name: "InoutAccessToComputedGlobalInUninstrumentedModule",
169
169
thread: { uninstrumentedTakesInout ( & computedGlobalInUninstrumentedModule1) } ,
170
170
thread: { uninstrumentedTakesInout ( & computedGlobalInUninstrumentedModule1) } )
171
171
// CHECK-LABEL: Running InoutAccessToComputedGlobalInUninstrumentedModule
172
- // CHECK-NOT: ThreadSanitizer: data race
172
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
173
173
174
174
// These access a computed global declared in the TSanUninstrumented module
175
175
testRace ( name: " ReadAndWriteToComputedGlobalInUninstrumentedModule " ,
176
176
thread: { computedGlobalInUninstrumentedModule2 = 7 } ,
177
177
thread: { _ = computedGlobalInUninstrumentedModule2 } )
178
178
// CHECK-LABEL: Running ReadAndWriteToComputedGlobalInUninstrumentedModule
179
- // CHECK-NOT: ThreadSanitizer: data race
179
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
180
180
181
181
182
182
@@ -187,7 +187,7 @@ testRace(name: "GlobalUninstrumentedClassStoredPropertyMutatingMethod",
187
187
thread: { _ = globalForGlobalUninstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. read ( ) } ,
188
188
thread: { globalForGlobalUninstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. mutate ( ) } )
189
189
// CHECK-LABEL: Running GlobalUninstrumentedClassStoredPropertyMutatingMethod
190
- // CHECK-NOT: ThreadSanitizer: data race
190
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
191
191
192
192
// Note: TSan doesn't see a race above because it doesn't see any load on the
193
193
// read side because the getter for the class property is not instrumented.
@@ -198,7 +198,7 @@ testRace(name: "GlobalUninstrumentedClassStoredPropertyInout",
198
198
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassStoredPropertyInout. storedStructProperty. storedProperty1) } ,
199
199
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassStoredPropertyInout. storedStructProperty. storedProperty2) } )
200
200
// CHECK-LABEL: Running GlobalUninstrumentedClassStoredPropertyInout
201
- // CHECK: ThreadSanitizer: data race
201
+ // CHECK: ThreadSanitizer: Swift access race
202
202
// CHECK: Location is heap block
203
203
204
204
// Note: TSan sees the race above because the inout instrumentation adds an
@@ -210,7 +210,7 @@ testRace(name: "GlobalUninstrumentedClassComputedPropertyInout",
210
210
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassComputedPropertyInout. computedStructProperty. storedProperty1) } ,
211
211
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassComputedPropertyInout. computedStructProperty. storedProperty1) } )
212
212
// CHECK-LABEL: Running GlobalUninstrumentedClassComputedPropertyInout
213
- // CHECK-NO : ThreadSanitizer: data race
213
+ // CHECK-NOT : ThreadSanitizer: {{.*}} race
214
214
215
215
// In the above the write in instrumented code is to the value buffer allocated
216
216
// at the call site so there is no data race if the getter and setters themselves
@@ -223,7 +223,7 @@ testRace(name: "GlobalInstrumentedClassStoredPropertyMutatingMethod",
223
223
thread: { _ = globalForGlobalInstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. read ( ) } ,
224
224
thread: { globalForGlobalInstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. mutate ( ) } )
225
225
// CHECK-LABEL: Running GlobalInstrumentedClassStoredPropertyMutatingMethod
226
- // CHECK: ThreadSanitizer: data race
226
+ // CHECK: ThreadSanitizer: Swift access race
227
227
// CHECK: Location is heap block
228
228
//
229
229
// TSan does see this above race because the getter and materializeForSet is instrumented
@@ -254,7 +254,7 @@ func runCapturedLocalStructMutatingMethod() {
254
254
thread: { l. mutate ( ) } )
255
255
}
256
256
// CHECK-LABEL: Running CapturedLocalStructMutatingMethod
257
- // CHECK: ThreadSanitizer: data race
257
+ // CHECK: ThreadSanitizer: Swift access race
258
258
// CHECK: Location is heap block
259
259
260
260
@@ -265,7 +265,7 @@ func runCapturedLocalStructDifferentStoredPropertiesInout() {
265
265
thread: { uninstrumentedTakesInout ( & l. storedProperty2) } )
266
266
}
267
267
// CHECK-LABEL: Running CapturedLocalStructDifferentStoredPropertiesInout
268
- // CHECK: ThreadSanitizer: data race
268
+ // CHECK: ThreadSanitizer: Swift access race
269
269
// CHECK: Location is heap block
270
270
271
271
@@ -276,7 +276,7 @@ func runCapturedLocalClassGeneralMethods() {
276
276
thread: { l. mutate ( ) } )
277
277
}
278
278
// CHECK-LABEL: Running CapturedLocalClassGeneralMethods
279
- // CHECK-NOT: ThreadSanitizer: data race
279
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
280
280
281
281
282
282
func runCapturedLocalDifferentStoredPropertiesInout( ) {
@@ -286,7 +286,7 @@ func runCapturedLocalDifferentStoredPropertiesInout() {
286
286
thread: { uninstrumentedTakesInout ( & l. storedProperty2) } )
287
287
}
288
288
// CHECK-LABEL: Running CapturedLocalClassDifferentStoredPropertiesInout
289
- // CHECK-NOT: ThreadSanitizer: data race
289
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
290
290
291
291
func runCapturedLocalSameStoredPropertyInout( ) {
292
292
let l = UninstrumentedClass ( )
@@ -295,7 +295,7 @@ func runCapturedLocalSameStoredPropertyInout() {
295
295
thread: { uninstrumentedTakesInout ( & l. storedProperty1) } )
296
296
}
297
297
// CHECK-LABEL: Running CapturedLocalClassSameStoredPropertyInout
298
- // CHECK: ThreadSanitizer: data race
298
+ // CHECK: ThreadSanitizer: Swift access race
299
299
// CHECK: Location is heap block
300
300
301
301
runLocalTests ( )
0 commit comments