Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ if(SYCL_UR_USE_FETCH_CONTENT)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 6298474e628889d3598b9416303a52e67a2b66aa
# Merge: 3cd6eaeb 4bb6a103
# commit 185149248dd257bd37482aac43307a136204c051
# Merge: 2af159d4 d619bcd1
# Author: Piotr Balcer <[email protected]>
# Date: Wed Sep 18 09:20:05 2024 +0200
# Merge pull request #2093 from lslusarczyk/memleak-fix
# fixed issue #1990, L0 leaks checker counts successful create/destroy only
set(UNIFIED_RUNTIME_TAG 6298474e628889d3598b9416303a52e67a2b66aa)
# 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
Expand Down
24 changes: 24 additions & 0 deletions sycl/test-e2e/AddressSanitizer/memory-leak/memory-leak.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// REQUIRES: linux, cpu
// RUN: %{build} %device_asan_flags -O0 -g -o %t
// RUN: %{run} %t 2>&1 | FileCheck %s

#include <sycl/detail/core.hpp>

#include <sycl/usm.hpp>

int main() {
sycl::queue Q;
constexpr std::size_t N = 12;
auto *array = sycl::malloc_device<char>(N, Q);

Q.submit([&](sycl::handler &h) {
h.parallel_for<class MyKernelR_4>(
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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ int main() {
// CHECK: ====ERROR: DeviceSanitizer
// CHECK-NOT: ====ERROR: DeviceSanitizer

sycl::free(array, Q);
return 0;
}