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]
Este commit está contenido en:
@@ -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;
|
||||
}
|
||||
|
||||
Referencia en una nueva incidencia
Block a user