From 87b348c51d1c9edeaa4a3856d557a75d57604787 Mon Sep 17 00:00:00 2001 From: David Yat Sin <77975354+dayatsin-amd@users.noreply.github.com> Date: Thu, 21 Aug 2025 10:25:50 -0400 Subject: [PATCH] rocr: Fix hsa_amd_pointer_info regression (#638) Fix regression when hsa_amd_pointer_info is called on a pointer that was allocated using non-VMM APIs. The helper function VMemoryPtrInfo should return error when the address is not found so that PtrInfo does the lookup via Thunk. --- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 8b8fc83b9f..e2b11e7537 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -995,7 +995,8 @@ hsa_status_t Runtime::VMemoryPtrInfo(const void* ptr, hsa_amd_pointer_info_t* in /* Allocation not found */ info->type = HSA_EXT_POINTER_TYPE_UNKNOWN; - return HSA_STATUS_SUCCESS; + /* This is a helper function, return error to indicate ptr not found */ + return HSA_STATUS_ERROR; } hsa_status_t Runtime::PtrInfo(const void* ptr, hsa_amd_pointer_info_t* info, void* (*alloc)(size_t),