Make sure to remove the global var from amd::MemObjMap
We need this otherwise ROCr can give us a matching address for another allocation and doing "insert" in ROCclr will not update the map with the newest object. We would then end up using stale objects (yikes) SWDEV-234992 Change-Id: I3475adf9781a9309d64a024fae45181d7e5afb04
This commit is contained in:
@@ -229,6 +229,11 @@ std::vector< std::pair<hipModule_t, bool> >* PlatformState::unregisterVar(hipMod
|
||||
= reinterpret_cast<texture<float, hipTextureType1D, hipReadModeElementType> *>(dvar.shadowVptr);
|
||||
delete tex_hptr;
|
||||
}
|
||||
for (size_t dev = 0; dev < g_devices.size(); ++dev) {
|
||||
if (dvar.rvars[dev].getdeviceptr()) {
|
||||
amd::MemObjMap::RemoveMemObj(dvar.rvars[dev].getdeviceptr());
|
||||
}
|
||||
}
|
||||
vars_.erase(it++);
|
||||
} else {
|
||||
++it;
|
||||
|
||||
Referens i nytt ärende
Block a user