From 94b32ac27970c3e907429b2d16bf0ee038cf8a07 Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Mon, 27 Jan 2025 16:30:43 +0000 Subject: [PATCH] Assert that Device is valid for memory poisoning This (hopefully) silences a Coverity issue. --- source/loader/layers/sanitizer/msan/msan_interceptor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/loader/layers/sanitizer/msan/msan_interceptor.cpp b/source/loader/layers/sanitizer/msan/msan_interceptor.cpp index 417ffc6527..a0c2183f49 100644 --- a/source/loader/layers/sanitizer/msan/msan_interceptor.cpp +++ b/source/loader/layers/sanitizer/msan/msan_interceptor.cpp @@ -75,6 +75,7 @@ ur_result_t MsanInterceptor::allocateMemory(ur_context_handle_t Context, if (Type != AllocType::DEVICE_USM) { return UR_RESULT_SUCCESS; } + assert(Device); auto AI = std::make_shared(MsanAllocInfo{(uptr)Allocated, Size,