SWDEV-532576 - clr_logs_<pid>.txt default AMD_LOG_LEVEL_FILE (#480)
avoids app crash and uses default AMD_LOG_LEVEL_FILE if invalid name is passed
[ROCm/clr commit: 76637d7ebe]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0a7064606c
Коммит
5c412edcd1
@@ -151,8 +151,12 @@ bool Flag::init() {
|
||||
if (!flagIsDefault(AMD_LOG_LEVEL)) {
|
||||
if (!flagIsDefault(AMD_LOG_LEVEL_FILE)) {
|
||||
std::string fileName = AMD_LOG_LEVEL_FILE;
|
||||
fileName = fileName + "_" + std::to_string(Os::getProcessId());
|
||||
std::string pid = std::to_string(Os::getProcessId());
|
||||
fileName = fileName + "_" + pid;
|
||||
outFile = fopen(fileName.c_str(), "a");
|
||||
if (outFile == NULL) {
|
||||
outFile = fopen(("clr_logs_" + pid + ".txt").c_str(), "a");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user