From dec5c52e07ee71cc47dcc39ebff8a0f6f56a61b9 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Wed, 12 Jul 2017 20:35:20 -0500 Subject: [PATCH] Simplify pointer info version check. Change-Id: I0ed363f1261ffc041547f313970ca67298ace56c --- runtime/hsa-runtime/core/runtime/runtime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/runtime.cpp b/runtime/hsa-runtime/core/runtime/runtime.cpp index e6a28e86d3..f480914285 100644 --- a/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -687,8 +687,8 @@ hsa_status_t Runtime::PtrInfo(void* ptr, hsa_amd_pointer_info_t* info, void* (*a hsa_amd_pointer_info_t retInfo; - // check output struct is at least as large as the first info revision. - if (info->size < 40) return HSA_STATUS_ERROR_INVALID_ARGUMENT; + // check output struct has an initialized size. + if (info->size == 0) return HSA_STATUS_ERROR_INVALID_ARGUMENT; bool returnListData = ((alloc != nullptr) && (num_agents_accessible != nullptr) && (accessible != nullptr));