SWDEV-458026 - Check for hsa_handle/svm_ptr before removing from MemObjMap.
Change-Id: I967735c01c6321eeb768963ecb88667dbbe92f08
[ROCm/clr commit: fa4c1a0206]
This commit is contained in:
committed by
Karthik Jayaprakash
parent
bc5a2e3b1e
commit
6f2179d9d8
@@ -247,7 +247,9 @@ hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* hand
|
||||
phys_mem_obj->getUserData().data = new hip::GenericAllocation(*phys_mem_obj, 0, prop);
|
||||
*handle = reinterpret_cast<hipMemGenericAllocationHandle_t>(phys_mem_obj->getUserData().data);
|
||||
|
||||
amd::MemObjMap::RemoveMemObj(phys_mem_obj->getSvmPtr());
|
||||
if (amd::MemObjMap::FindMemObj(phys_mem_obj->getSvmPtr())) {
|
||||
amd::MemObjMap::RemoveMemObj(phys_mem_obj->getSvmPtr());
|
||||
}
|
||||
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user