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
이 커밋은 다음에 포함됨:
@@ -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_);
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단