fix patch to work with rocm-device-libs commit by Praveen that added implementaton for memcpy and friends
@@ -8,13 +8,13 @@ index f1ed020..24f1c13 100644
opencl_bc_lib(NAME asanrtl SOURCES ${sources})
+set(CLANG_OCL_FLAGS ${CLANG_OCL_FLAGS} -D__BUILD_FOR_OPENMP)
+opencl_bc_lib(NAME asanrtl_omp SOURCES ${sources})
-diff --git a/asanrtl/src/report.cl b/asanrtl/src/report.cl
-index 1b0a64f..4fbb5c1 100644
---- a/asanrtl/src/report.cl
-+++ b/asanrtl/src/report.cl
-@@ -17,12 +17,19 @@
-
- #define OPT_NONE __attribute__((optnone))
+diff --git a/asanrtl/inc/asan_util.h b/asanrtl/inc/asan_util.h
+index 941b843..0ec0022 100644
+--- a/asanrtl/inc/asan_util.h
++++ b/asanrtl/inc/asan_util.h
+@@ -15,6 +15,13 @@ typedef unsigned short u16;
+ typedef short s16;
+ typedef unsigned long u64;
+#ifndef __BUILD_FOR_OPENMP
+#define __HOSTCALL_ASAN_WRAPPER __ockl_sanitizer_report
@@ -23,15 +23,17 @@ index 1b0a64f..4fbb5c1 100644
+#define __HOSTCALL_ASAN_WRAPPER __hostrpc_sanitizer_report
+#endif
+
- #define REPORT_IMPL(caller_pc, addr, is_write, size, no_abort) \
- uptr read = is_write; \
+ #define ASAN_SHADOW 3
+
+ #define SHADOW_GRANULARITY (1ULL << ASAN_SHADOW)
+@@ -32,7 +39,7 @@ typedef unsigned long u64;
if (no_abort) \
read |= 0xFFFFFFFF00000000; \
\
- __ockl_sanitizer_report(addr, caller_pc, WORKGROUP_ID(x), WORKGROUP_ID(y), \
+ __HOSTCALL_ASAN_WRAPPER(addr, caller_pc, WORKGROUP_ID(x), WORKGROUP_ID(y), \
- WORKGROUP_ID(z), __ockl_get_local_linear_id(), read, size); \
-
+ WORKGROUP_ID(z), __ockl_get_local_linear_id(), \
+ read, size);
diff --git a/cmake/OCL.cmake b/cmake/OCL.cmake
index 4e324e8..a605d15 100644
