diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index a4c32b10be2de..3d5958be9c64e 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -117,13 +117,13 @@ if(SYCL_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 4517290650a9938537666e6409fb8e0db73ff4d8 - # Merge: 6298474e 3dbb7a2a - # Author: Omar Ahmed - # Date: Wed Sep 18 08:48:03 2024 +0100 - # Merge pull request #1914 from AllanZyne/review/yang/dsan_nullpointer - # [DeviceSanitizer] Support nullpointer detection - set(UNIFIED_RUNTIME_TAG 4517290650a9938537666e6409fb8e0db73ff4d8) + # commit 185149248dd257bd37482aac43307a136204c051 + # Merge: 2af159d4 d619bcd1 + # Author: Piotr Balcer + # Date: Thu Sep 19 11:02:27 2024 +0200 + # Merge pull request #1934 from yingcong-wu/yc/0806-exclude-shadow-from-coredump + # [DeviceSanitizer] Exclude shadow memory from coredump file for CPU device. + set(UNIFIED_RUNTIME_TAG 185149248dd257bd37482aac43307a136204c051) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need diff --git a/sycl/test-e2e/AddressSanitizer/memory-leak/memory-leak.cpp b/sycl/test-e2e/AddressSanitizer/memory-leak/memory-leak.cpp new file mode 100644 index 0000000000000..8fe5e431e6eec --- /dev/null +++ b/sycl/test-e2e/AddressSanitizer/memory-leak/memory-leak.cpp @@ -0,0 +1,24 @@ +// REQUIRES: linux, cpu +// RUN: %{build} %device_asan_flags -O0 -g -o %t +// RUN: %{run} %t 2>&1 | FileCheck %s + +#include + +#include + +int main() { + sycl::queue Q; + constexpr std::size_t N = 12; + auto *array = sycl::malloc_device(N, Q); + + Q.submit([&](sycl::handler &h) { + h.parallel_for( + sycl::nd_range<1>(N, 1), + [=](sycl::nd_item<1> item) { ++array[item.get_global_id(0)]; }); + }).wait(); + // CHECK: ERROR: DeviceSanitizer: detected memory leaks of Device USM + // CHECK: Direct leak of 12 byte(s) at {{0x.*}} allocated from: + // CHECK: in main {{.*memory-leak.cpp:}}[[@LINE-9]] + + return 0; +} diff --git a/sycl/test-e2e/AddressSanitizer/multiple-reports/multiple_kernels.cpp b/sycl/test-e2e/AddressSanitizer/multiple-reports/multiple_kernels.cpp index 6d1c46b535d48..1228dd94fde9a 100644 --- a/sycl/test-e2e/AddressSanitizer/multiple-reports/multiple_kernels.cpp +++ b/sycl/test-e2e/AddressSanitizer/multiple-reports/multiple_kernels.cpp @@ -46,5 +46,6 @@ int main() { // CHECK: {{READ of size 4 at kernel <.*Kernel4> LID\(0, 0, 0\) GID\(4, 0, 0\)}} // CHECK: {{ #0 .* .*multiple_kernels.cpp:}}[[@LINE-4]] + sycl::free(array, Q); return 0; } diff --git a/sycl/test-e2e/AddressSanitizer/multiple-reports/one_kernel.cpp b/sycl/test-e2e/AddressSanitizer/multiple-reports/one_kernel.cpp index aa702c61ad774..9e845b429b42a 100644 --- a/sycl/test-e2e/AddressSanitizer/multiple-reports/one_kernel.cpp +++ b/sycl/test-e2e/AddressSanitizer/multiple-reports/one_kernel.cpp @@ -27,5 +27,6 @@ int main() { // CHECK: ====ERROR: DeviceSanitizer // CHECK-NOT: ====ERROR: DeviceSanitizer + sycl::free(array, Q); return 0; }