Skip to content

Commit d046c06

Browse files
authored
[DeviceMSAN][NFC] Fix debug message and other misc. changes (#19104)
1 parent bcd88e7 commit d046c06

File tree

8 files changed

+7
-18
lines changed

8 files changed

+7
-18
lines changed

libdevice/include/asan_rtl.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#include "sanitizer_defs.hpp"
1111
#include "sanitizer_utils.hpp"
12-
#include "spir_global_var.hpp"
13-
#include <cstdint>
1412

1513
// Treat this header as system one to workaround frontend's restriction
1614
#pragma clang system_header

libdevice/include/msan_rtl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include "sanitizer_defs.hpp"
1111
#include "sanitizer_utils.hpp"
12-
#include "spir_global_var.hpp"
1312

1413
// Treat this header as system one to workaround frontend's restriction
1514
#pragma clang system_header

libdevice/include/sanitizer_defs.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
#pragma once
99

1010
#include "atomic.hpp"
11+
#include "device.h"
1112
#include "spir_global_var.hpp"
13+
#include "spirv_vars.h"
14+
1215
#include <cstdint>
1316

1417
using uptr = uintptr_t;

libdevice/include/sanitizer_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==------------------ group_utils.hpp - utils for group -------------------==//
1+
//==------------- sanitizer_utils.hpp - utils for sanitizers ---------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

libdevice/include/tsan_rtl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "sanitizer_defs.hpp"
1111
#include "sanitizer_utils.hpp"
12-
#include "spir_global_var.hpp"
12+
1313
#include "tsan/tsan_libdevice.hpp"
1414

1515
// Treat this header as system one to workaround frontend's restriction

libdevice/sanitizer/asan_rtl.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
#include "include/asan_rtl.hpp"
1010
#include "asan/asan_libdevice.hpp"
11-
#include "atomic.hpp"
12-
#include "device.h"
13-
#include "spirv_vars.h"
1411

1512
// Save the pointer to LaunchInfo
1613
__SYCL_GLOBAL__ uptr *__SYCL_LOCAL__ __AsanLaunchInfo;

libdevice/sanitizer/msan_rtl.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "include/msan_rtl.hpp"
10-
#include "atomic.hpp"
11-
#include "device.h"
12-
#include "include/sanitizer_defs.hpp"
13-
#include "include/sanitizer_utils.hpp"
1410
#include "msan/msan_libdevice.hpp"
15-
#include "spirv_vars.h"
1611

1712
DeviceGlobal<void *> __MsanLaunchInfo;
1813
#define GetMsanLaunchInfo \
@@ -339,7 +334,7 @@ inline void CopyShadowAndOrigin(uptr dst, uint32_t dst_as, uptr src,
339334
CopyOrigin(dst, dst_as, src, src_as, size);
340335

341336
MSAN_DEBUG(__spirv_ocl_printf(__msan_print_copy_shadow, dst, dst_as, src,
342-
src_as, shadow_dst, shadow_src));
337+
src_as, shadow_dst, shadow_src, size));
343338
}
344339

345340
static __SYCL_CONSTANT__ const char __msan_print_move_shadow[] =
@@ -365,7 +360,7 @@ inline void MoveShadowAndOrigin(uptr dst, uint32_t dst_as, uptr src,
365360
Memmove(shadow_dst, shadow_src, size);
366361

367362
MSAN_DEBUG(__spirv_ocl_printf(__msan_print_move_shadow, dst, dst_as, src,
368-
src_as, shadow_dst, shadow_src));
363+
src_as, shadow_dst, shadow_src, size));
369364
}
370365

371366
inline void UnpoisonShadow(uptr addr, uint32_t as, size_t size) {

libdevice/sanitizer/tsan_rtl.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "include/tsan_rtl.hpp"
10-
#include "atomic.hpp"
11-
#include "device.h"
12-
#include "spirv_vars.h"
1310

1411
DeviceGlobal<void *> __TsanLaunchInfo;
1512

0 commit comments

Comments
 (0)