SWDEV-467540 - Fix reference of freed locks
1.Move global amd::monitor listenerLock before global
class runtime_tear_down as it will be referenced in
~RuntimeTearDown() after main(). It should be freed
later than runtime_tear_down.
2.Update Device::~Device() to SVM free coopHostcallBuffer_
before context_ is released and freed.
Change-Id: I1d21378ff463477d3238d71e5e2a1a7d6b9147ad
[ROCm/clr commit: 544c45364f]
This commit is contained in:
gecommit door
Tao Sang
bovenliggende
5536be3e39
commit
20417d5b0f
@@ -246,6 +246,11 @@ void Device::checkAtomicSupport() {
|
||||
}
|
||||
|
||||
Device::~Device() {
|
||||
if (coopHostcallBuffer_) {
|
||||
amd::disableHostcalls(coopHostcallBuffer_);
|
||||
context().svmFree(coopHostcallBuffer_);
|
||||
coopHostcallBuffer_ = nullptr;
|
||||
}
|
||||
// Release cached map targets
|
||||
for (uint i = 0; mapCache_ != nullptr && i < mapCache_->size(); ++i) {
|
||||
if ((*mapCache_)[i] != nullptr) {
|
||||
@@ -301,12 +306,6 @@ Device::~Device() {
|
||||
|
||||
delete[] p2p_agents_list_;
|
||||
|
||||
if (coopHostcallBuffer_) {
|
||||
amd::disableHostcalls(coopHostcallBuffer_);
|
||||
context().svmFree(coopHostcallBuffer_);
|
||||
coopHostcallBuffer_ = nullptr;
|
||||
}
|
||||
|
||||
if (0 != prefetch_signal_.handle) {
|
||||
hsa_signal_destroy(prefetch_signal_);
|
||||
}
|
||||
|
||||
Verwijs in nieuw issue
Block a user