P4 to Git Change 1589062 by cpaquot@cpaquot-ocl-lc-lnx on 2018/08/02 18:34:20

SWDEV-145570 - [HIP] Fix a segfault exposed by rocBlas.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#39 edit


[ROCm/clr commit: 08a308dd59]
Este commit está contenido en:
foreman
2018-08-02 18:52:37 -04:00
padre 650747dfe6
commit 934eca953a
+2 -1
Ver fichero
@@ -1299,7 +1299,6 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
size_t offset = 0;
amd::Memory* memObj = getMemoryObject(ptr, offset);
amd::Context &memObjCtx = memObj->getContext();
int device = 0;
if (memObj != nullptr) {
@@ -1308,6 +1307,8 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
attributes->devicePointer = memObj->getSvmPtr();
attributes->isManaged = 0;
attributes->allocationFlags = memObj->getMemFlags();
amd::Context &memObjCtx = memObj->getContext();
for (auto& ctx : g_devices) {
++device;
if (*ctx == memObjCtx) {