Skip to content

Commit f2ac468

Browse files
committed
Minor fix
1 parent 8bc09e3 commit f2ac468

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libdevice/sanitizer/tsan_rtl.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ inline void DoReportRace(__SYCL_GLOBAL__ RawShadow *s, AccessType type,
177177
return;
178178
}
179179

180+
if (as == ADDRESS_SPACE_GENERIC &&
181+
TsanLaunchInfo->DeviceTy != DeviceType::CPU) {
182+
ConvertGenericPointer(addr, as);
183+
}
184+
180185
// Check if current address already being recorded before.
181186
for (uint32_t i = 0; i < TsanLaunchInfo->RecordedReportCount; i++) {
182187
auto &SanitizerReport = TsanLaunchInfo->Report[i];
@@ -189,10 +194,6 @@ inline void DoReportRace(__SYCL_GLOBAL__ RawShadow *s, AccessType type,
189194
auto &SanitizerReport =
190195
TsanLaunchInfo->Report[TsanLaunchInfo->RecordedReportCount++];
191196

192-
if (as == ADDRESS_SPACE_GENERIC) {
193-
ConvertGenericPointer(addr, as);
194-
}
195-
196197
SanitizerReport.Address = addr;
197198
SanitizerReport.Type =
198199
type | (as == ADDRESS_SPACE_LOCAL ? kAccessLocal : 0);

0 commit comments

Comments
 (0)