SWDEV-286082 - Fix C string processing in GPU printf
This fixes an issue in hostcall when processing printf of a C string. The calculation to round-up the string size to the next data chunk didn't include the extra byte for the null terminating character. Change-Id: I4cf0c250fa4fda253b0db15be461819ffce76d32
这个提交包含在:
@@ -64,8 +64,10 @@ template <typename... Args>
|
||||
static const uint64_t* consumeCstring(FILE* stream, int* outCount, const std::string& spec,
|
||||
const uint64_t* ptr, Args... args) {
|
||||
auto str = reinterpret_cast<const char*>(ptr);
|
||||
auto old = *outCount;
|
||||
checkPrintf(stream, outCount, spec.c_str(), args..., str);
|
||||
return ptr + (strlen(str) + 7) / 8;
|
||||
auto stringMemSize = *outCount - old + 1;
|
||||
return ptr + (stringMemSize + 7) / 8;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
|
||||
在新工单中引用
屏蔽一个用户