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
[ROCm/clr commit: 8341fd31d1]
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
Siuchi Chan
γονέας
6f2e1cec35
υποβολή
1ded52c591
@@ -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>
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user