SWDEV-486510 - Delete hip::Function object, in case compiler passes duplicate hostFunction ptr.
Change-Id: Ic8714eb9022a0f2150b2ea5dc008cecd7a9fae27
Этот коммит содержится в:
коммит произвёл
Ajay GunaShekar
родитель
6f2bad3998
Коммит
e7c0e06b5e
@@ -1215,8 +1215,10 @@ hipError_t StatCO::registerStatFunction(const void* hostFunction, Function* func
|
||||
|
||||
if (functions_.find(hostFunction) != functions_.end()) {
|
||||
DevLogPrintfError("hostFunctionPtr: 0x%x already exists", hostFunction);
|
||||
delete func;
|
||||
} else {
|
||||
functions_.insert(std::make_pair(hostFunction, func));
|
||||
}
|
||||
functions_.insert(std::make_pair(hostFunction, func));
|
||||
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user