P4 to Git Change 1410153 by wchau@wchau_OCL_boltzmann on 2017/05/16 11:07:21
SWDEV-121587 - [OCL] Segmentation fault when program is used without built first. Fix the issue by adding sanity check for the symbol table before using it.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#87 edit
[ROCm/clr commit: 8b44cced55]
Ta zmiana jest zawarta w:
%! (template.HTML=
foreman)złożyło 2017-05-16 11:22:14 -04:00
1 rodzic
7b2758bb94
złożenie
f7724af133
Plik 1 zmieniony
+5
@@ -38,6 +38,11 @@ Program::~Program() {
|
||||
}
|
||||
|
||||
const Symbol* Program::findSymbol(const char* kernelName) const {
|
||||
// avoid seg. fault if the program has not built yet
|
||||
if (symbolTable_ == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
symbols_t::const_iterator it = symbolTable_->find(kernelName);
|
||||
return (it == symbolTable_->end()) ? NULL : &it->second;
|
||||
}
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika