P4 to Git Change 1150377 by gandryey@gera-w8 on 2015/05/13 11:39:13

EPR #419351 - clEnqueueNDRange crash if one doesn't create a device queue and use device enqueue in the kernel
	- add a check for defQueue is NULL in case the app didn't create one.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#510 edit


[ROCm/clr commit: 22e298d645]
This commit is contained in:
foreman
2015-05-13 12:20:57 -04:00
rodzic 0621430a5c
commit a60ce1ef65
@@ -2420,8 +2420,13 @@ Device::validateKernel(const amd::Kernel& kernel, const device::VirtualDevice* v
if (hsaKernel->dynamicParallelism()) {
amd::DeviceQueue* defQueue =
kernel.program().context().defDeviceQueue(*this);
vgpu = static_cast<VirtualGPU*>(defQueue->vDev());
if (!allocScratch(hsaKernel->prog().maxScratchRegs(), vgpu)) {
if (defQueue != NULL) {
vgpu = static_cast<VirtualGPU*>(defQueue->vDev());
if (!allocScratch(hsaKernel->prog().maxScratchRegs(), vgpu)) {
return false;
}
}
else {
return false;
}
}