rocr: Add nullptr check in IterateExecutables
When an entry is deleted from the array, it's set to nullptr
but not removed. Most other functions that
iterate over the array check if the entry is nullptr
but this loop in IterateExecutables did not.
Change-Id: I763b361eea59f6df201bb86ead0234e95f2cf79c
[ROCm/ROCR-Runtime commit: f3664fd124]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
David Yat Sin
ebeveyn
c6bb1eef90
işleme
94ee49bdbd
@@ -280,9 +280,11 @@ hsa_status_t AmdHsaCodeLoader::IterateExecutables(
|
||||
assert(callback);
|
||||
|
||||
for (auto &exec : executables) {
|
||||
hsa_status_t status = callback(Executable::Handle(exec), data);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
return status;
|
||||
if(exec != nullptr){
|
||||
hsa_status_t status = callback(Executable::Handle(exec), data);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle