P4 to Git Change 1310081 by lmoriche@lmoriche_opencl_dev on 2016/09/01 21:27:48
SWDEV-94610 - The spec says that the value returned for HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH does not include the NUL terminator. We should add one before using the string.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#25 edit
[ROCm/clr commit: 557d2bfddf]
Этот коммит содержится в:
@@ -62,8 +62,9 @@ GetKernelNamesCallback(
|
||||
uint32_t len;
|
||||
hsa_executable_symbol_get_info(symbol, HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH, &len);
|
||||
|
||||
char* symName = (char*) alloca(len);
|
||||
char* symName = (char*) alloca(len+1);
|
||||
hsa_executable_symbol_get_info(symbol, HSA_EXECUTABLE_SYMBOL_INFO_NAME, symName);
|
||||
symName[len] = '\0';
|
||||
|
||||
std::string kernelName(symName);
|
||||
symNameList->push_back(kernelName);
|
||||
|
||||
Ссылка в новой задаче
Block a user