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
Dieser Commit ist enthalten in:
foreman
2017-05-16 11:22:14 -04:00
Ursprung c4024bac0b
Commit 8b44cced55
+5
Datei anzeigen
@@ -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;
}