P4 to Git Change 1495208 by gandryey@gera-w8 on 2017/12/15 15:33:48

SWDEV-135647 - Runtime should not assert on invalid printf
	- Replace the asserts for invalid printf index with an error.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.cpp#9 edit


[ROCm/clr commit: 1a3de160ec]
Этот коммит содержится в:
foreman
2017-12-15 15:37:57 -05:00
родитель e1316da844
Коммит 0f7dcbc8ca
3 изменённых файлов: 12 добавлений и 3 удалений
+4 -1
Просмотреть файл
@@ -608,7 +608,10 @@ bool PrintfDbgHSA::output(VirtualGPU& gpu, bool printfEnabled,
// parse the debug buffer
while (sbt < copySize) {
assert(((*dbgBufferPtr) < printfInfo.size()) && "Cound't find the reported PrintfID!");
if (*dbgBufferPtr >= printfInfo.size()) {
LogError("Couldn't find the reported PrintfID!");
return false;
}
const PrintfInfo& info = printfInfo[(*dbgBufferPtr)];
sb += sizeof(uint32_t);
for (ita = info.arguments_.begin(); ita != info.arguments_.end(); ++ita) {
+4 -1
Просмотреть файл
@@ -604,7 +604,10 @@ bool PrintfDbgHSA::output(VirtualGPU& gpu, bool printfEnabled,
// parse the debug buffer
while (sbt < copySize) {
assert(((*dbgBufferPtr) < printfInfo.size()) && "Cound't find the reported PrintfID!");
if (*dbgBufferPtr >= printfInfo.size()) {
LogError("Couldn't find the reported PrintfID!");
return false;
}
const PrintfInfo& info = printfInfo[(*dbgBufferPtr)];
sb += sizeof(uint32_t);
for (ita = info.arguments_.begin(); ita != info.arguments_.end(); ++ita) {
+4 -1
Просмотреть файл
@@ -421,7 +421,10 @@ bool PrintfDbg::output(VirtualGPU& gpu, bool printfEnabled,
// parse the debug buffer
while (sbt < offsetSize) {
assert(((*dbgBufferPtr) < printfInfo.size()) && "Cound't find the reported PrintfID!");
if (*dbgBufferPtr >= printfInfo.size()) {
LogError("Couldn't find the reported PrintfID!");
return false;
}
const PrintfInfo& info = printfInfo[(*dbgBufferPtr)];
sb += sizeof(uint32_t);
for (ita = info.arguments_.begin(); ita != info.arguments_.end(); ++ita) {