@@ -76,31 +76,31 @@ testRace(name: "GlobalStructMutatingMethod",
76
76
thread: { _ = globalForGlobalStructMutatingMethod. read ( ) } ,
77
77
thread: { globalForGlobalStructMutatingMethod. mutate ( ) } )
78
78
// CHECK-LABEL: Running GlobalStructMutatingMethod
79
- // CHECK: ThreadSanitizer: data race
79
+ // CHECK: ThreadSanitizer: Swift access race
80
80
// CHECK: Location is global
81
81
82
82
var globalForGlobalStructDifferentStoredPropertiesInout = UninstrumentedStruct ( )
83
83
testRace ( name: " GlobalStructDifferentStoredPropertiesInout " ,
84
84
thread: { uninstrumentedTakesInout ( & globalForGlobalStructDifferentStoredPropertiesInout. storedProperty1) } ,
85
85
thread: { uninstrumentedTakesInout ( & globalForGlobalStructDifferentStoredPropertiesInout. storedProperty2) } )
86
86
// CHECK-LABEL: Running GlobalStructDifferentStoredPropertiesInout
87
- // CHECK: ThreadSanitizer: data race
87
+ // CHECK: ThreadSanitizer: Swift access race
88
88
// CHECK: Location is global
89
89
90
90
var globalForGlobalStructSameStoredPropertyInout = UninstrumentedStruct ( )
91
91
testRace ( name: " GlobalStructSameStoredPropertyInout " ,
92
92
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSameStoredPropertyInout. storedProperty1) } ,
93
93
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSameStoredPropertyInout. storedProperty1) } )
94
94
// CHECK-LABEL: Running GlobalStructSameStoredPropertyInout
95
- // CHECK: ThreadSanitizer: data race
95
+ // CHECK: ThreadSanitizer: Swift access race
96
96
97
97
98
98
var globalForGlobalStructSubscriptDifferentIndexesInout = UninstrumentedStruct ( )
99
99
testRace ( name: " GlobalStructSubscriptDifferentIndexesInout " ,
100
100
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSubscriptDifferentIndexesInout[ 0 ] ) } ,
101
101
thread: { uninstrumentedTakesInout ( & globalForGlobalStructSubscriptDifferentIndexesInout[ 1 ] ) } )
102
102
// CHECK-LABEL: Running GlobalStructSubscriptDifferentIndexes
103
- // CHECK: ThreadSanitizer: data race
103
+ // CHECK: ThreadSanitizer: Swift access race
104
104
// CHECK: Location is global
105
105
106
106
@@ -109,45 +109,45 @@ testRace(name: "GlobalStructSubscriptDifferentIndexesGetSet",
109
109
thread: { _ = globalForGlobalStructSubscriptDifferentIndexesGetSet [ 0 ] } ,
110
110
thread: { globalForGlobalStructSubscriptDifferentIndexesGetSet [ 1 ] = 12 } )
111
111
// CHECK-LABEL: Running GlobalStructSubscriptDifferentIndexesGetSet
112
- // CHECK: ThreadSanitizer: data race
112
+ // CHECK: ThreadSanitizer: Swift access race
113
113
// CHECK: Location is global
114
114
115
115
var globalForGlobalClassGeneralMethods = UninstrumentedClass ( )
116
116
testRace ( name: " GlobalClassGeneralMethods " ,
117
117
thread: { _ = globalForGlobalClassGeneralMethods. read ( ) } ,
118
118
thread: { globalForGlobalClassGeneralMethods. mutate ( ) } )
119
119
// CHECK-LABEL: Running GlobalClassGeneralMethods
120
- // CHECK-NOT: ThreadSanitizer: data race
120
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
121
121
122
122
var globalForGlobalClassDifferentStoredPropertiesInout = UninstrumentedClass ( )
123
123
testRace ( name: " GlobalClassDifferentStoredPropertiesInout " ,
124
124
thread: { uninstrumentedTakesInout ( & globalForGlobalClassDifferentStoredPropertiesInout. storedProperty1) } ,
125
125
thread: { uninstrumentedTakesInout ( & globalForGlobalClassDifferentStoredPropertiesInout. storedProperty2) } )
126
126
// CHECK-LABEL: Running GlobalClassDifferentStoredPropertiesInout
127
- // CHECK-NOT: ThreadSanitizer: data race
127
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
128
128
129
129
var globalForGlobalClassSubscriptDifferentIndexesInout = UninstrumentedClass ( )
130
130
testRace ( name: " GlobalClassSubscriptDifferentIndexesInout " ,
131
131
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSubscriptDifferentIndexesInout[ 0 ] ) } ,
132
132
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSubscriptDifferentIndexesInout[ 1 ] ) } )
133
133
// CHECK-LABEL: Running GlobalClassSubscriptDifferentIndexesInout
134
- // CHECK-NOT: ThreadSanitizer: data race
134
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
135
135
136
136
137
137
var globalForGlobalClassSameStoredPropertyInout = UninstrumentedClass ( )
138
138
testRace ( name: " GlobalClassSameStoredPropertyInout " ,
139
139
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSameStoredPropertyInout. storedProperty1) } ,
140
140
thread: { uninstrumentedTakesInout ( & globalForGlobalClassSameStoredPropertyInout. storedProperty1) } )
141
141
// CHECK-LABEL: Running GlobalClassSameStoredPropertyInout
142
- // CHECK: ThreadSanitizer: data race
142
+ // CHECK: ThreadSanitizer: Swift access race
143
143
// CHECK: Location is heap block
144
144
145
145
// These access a global declared in the TSanUninstrumented module
146
146
testRace ( name: " InoutAccessToStoredGlobalInUninstrumentedModule " ,
147
147
thread: { uninstrumentedTakesInout ( & storedGlobalInUninstrumentedModule1) } ,
148
148
thread: { uninstrumentedTakesInout ( & storedGlobalInUninstrumentedModule1) } )
149
149
// CHECK-LABEL: Running InoutAccessToStoredGlobalInUninstrumentedModule
150
- // CHECK: ThreadSanitizer: data race
150
+ // CHECK: ThreadSanitizer: Swift access race
151
151
// CHECK: Location is global
152
152
153
153
// These access a global declared in the TSanUninstrumented module.
@@ -165,14 +165,14 @@ testRace(name: "InoutAccessToComputedGlobalInUninstrumentedModule",
165
165
thread: { uninstrumentedTakesInout ( & computedGlobalInUninstrumentedModule1) } ,
166
166
thread: { uninstrumentedTakesInout ( & computedGlobalInUninstrumentedModule1) } )
167
167
// CHECK-LABEL: Running InoutAccessToComputedGlobalInUninstrumentedModule
168
- // CHECK-NOT: ThreadSanitizer: data race
168
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
169
169
170
170
// These access a computed global declared in the TSanUninstrumented module
171
171
testRace ( name: " ReadAndWriteToComputedGlobalInUninstrumentedModule " ,
172
172
thread: { computedGlobalInUninstrumentedModule2 = 7 } ,
173
173
thread: { _ = computedGlobalInUninstrumentedModule2 } )
174
174
// CHECK-LABEL: Running ReadAndWriteToComputedGlobalInUninstrumentedModule
175
- // CHECK-NOT: ThreadSanitizer: data race
175
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
176
176
177
177
178
178
@@ -183,7 +183,7 @@ testRace(name: "GlobalUninstrumentedClassStoredPropertyMutatingMethod",
183
183
thread: { _ = globalForGlobalUninstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. read ( ) } ,
184
184
thread: { globalForGlobalUninstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. mutate ( ) } )
185
185
// CHECK-LABEL: Running GlobalUninstrumentedClassStoredPropertyMutatingMethod
186
- // CHECK-NOT: ThreadSanitizer: data race
186
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
187
187
188
188
// Note: TSan doesn't see a race above because it doesn't see any load on the
189
189
// read side because the getter for the class property is not instrumented.
@@ -194,7 +194,7 @@ testRace(name: "GlobalUninstrumentedClassStoredPropertyInout",
194
194
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassStoredPropertyInout. storedStructProperty. storedProperty1) } ,
195
195
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassStoredPropertyInout. storedStructProperty. storedProperty2) } )
196
196
// CHECK-LABEL: Running GlobalUninstrumentedClassStoredPropertyInout
197
- // CHECK: ThreadSanitizer: data race
197
+ // CHECK: ThreadSanitizer: Swift access race
198
198
// CHECK: Location is heap block
199
199
200
200
// Note: TSan sees the race above because the inout instrumentation adds an
@@ -206,7 +206,7 @@ testRace(name: "GlobalUninstrumentedClassComputedPropertyInout",
206
206
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassComputedPropertyInout. computedStructProperty. storedProperty1) } ,
207
207
thread: { uninstrumentedTakesInout ( & globalForGlobalUninstrumentedClassComputedPropertyInout. computedStructProperty. storedProperty1) } )
208
208
// CHECK-LABEL: Running GlobalUninstrumentedClassComputedPropertyInout
209
- // CHECK-NO : ThreadSanitizer: data race
209
+ // CHECK-NOT : ThreadSanitizer: {{.*}} race
210
210
211
211
// In the above the write in instrumented code is to the value buffer allocated
212
212
// at the call site so there is no data race if the getter and setters themselves
@@ -219,7 +219,7 @@ testRace(name: "GlobalInstrumentedClassStoredPropertyMutatingMethod",
219
219
thread: { _ = globalForGlobalInstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. read ( ) } ,
220
220
thread: { globalForGlobalInstrumentedClassStoredPropertyMutatingMethod. storedStructProperty. mutate ( ) } )
221
221
// CHECK-LABEL: Running GlobalInstrumentedClassStoredPropertyMutatingMethod
222
- // CHECK: ThreadSanitizer: data race
222
+ // CHECK: ThreadSanitizer: Swift access race
223
223
// CHECK: Location is heap block
224
224
//
225
225
// TSan does see this above race because the getter and materializeForSet is instrumented
@@ -250,7 +250,7 @@ func runCapturedLocalStructMutatingMethod() {
250
250
thread: { l. mutate ( ) } )
251
251
}
252
252
// CHECK-LABEL: Running CapturedLocalStructMutatingMethod
253
- // CHECK: ThreadSanitizer: data race
253
+ // CHECK: ThreadSanitizer: Swift access race
254
254
// CHECK: Location is heap block
255
255
256
256
@@ -261,7 +261,7 @@ func runCapturedLocalStructDifferentStoredPropertiesInout() {
261
261
thread: { uninstrumentedTakesInout ( & l. storedProperty2) } )
262
262
}
263
263
// CHECK-LABEL: Running CapturedLocalStructDifferentStoredPropertiesInout
264
- // CHECK: ThreadSanitizer: data race
264
+ // CHECK: ThreadSanitizer: Swift access race
265
265
// CHECK: Location is heap block
266
266
267
267
@@ -272,7 +272,7 @@ func runCapturedLocalClassGeneralMethods() {
272
272
thread: { l. mutate ( ) } )
273
273
}
274
274
// CHECK-LABEL: Running CapturedLocalClassGeneralMethods
275
- // CHECK-NOT: ThreadSanitizer: data race
275
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
276
276
277
277
278
278
func runCapturedLocalDifferentStoredPropertiesInout( ) {
@@ -282,7 +282,7 @@ func runCapturedLocalDifferentStoredPropertiesInout() {
282
282
thread: { uninstrumentedTakesInout ( & l. storedProperty2) } )
283
283
}
284
284
// CHECK-LABEL: Running CapturedLocalClassDifferentStoredPropertiesInout
285
- // CHECK-NOT: ThreadSanitizer: data race
285
+ // CHECK-NOT: ThreadSanitizer: {{.*}} race
286
286
287
287
func runCapturedLocalSameStoredPropertyInout( ) {
288
288
let l = UninstrumentedClass ( )
@@ -291,7 +291,7 @@ func runCapturedLocalSameStoredPropertyInout() {
291
291
thread: { uninstrumentedTakesInout ( & l. storedProperty1) } )
292
292
}
293
293
// CHECK-LABEL: Running CapturedLocalClassSameStoredPropertyInout
294
- // CHECK: ThreadSanitizer: data race
294
+ // CHECK: ThreadSanitizer: Swift access race
295
295
// CHECK: Location is heap block
296
296
297
297
runLocalTests ( )
0 commit comments