Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions sycl/test-e2e/AddressSanitizer/misaligned/misalign-long.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// RUN: %{run} not --crash %t2.out 2>&1 | FileCheck %s
// RUN: %{build} %device_asan_flags -O2 -g -o %t3.out
// RUN: %{run} not --crash %t3.out 2>&1 | FileCheck %s
// An unlimited stack selects Linux's legacy mmap layout, allowing Shared USM
// addresses below the usual PVC range starting at 0x700000000000.
// RUN: %if arch-intel_gpu_pvc %{ %{run} not --crash sh -c 'ulimit -s unlimited && exec "$@"' sh %t3.out 2>&1 | FileCheck %s %}
#include <iostream>
#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ void validateSharedUSM([[maybe_unused]] uptr Allocated,
[[maybe_unused]] DeviceType DeviceType) {
switch (DeviceType) {
case DeviceType::GPU_PVC:
assert((Allocated >> 44) == 0x7);
// FIXME: ASan supports all lower 47-bit addresses, including Shared USM
// placed below 0x700000000000 by Linux. MSan/TSan discard more address
// bits, so relaxing their checks could alias shadow memory. They can still
// hit this assertion until their shadow mappings support the wider range.
if (getContext()->enabledType == SanitizerType::AddressSanitizer)
assert((Allocated >> 47) == 0);
else
assert((Allocated >> 44) == 0x7);
break;
default:
break;
Expand Down
Loading