SWDEV-485827 release hostcall listener memory regardless of thread status
The early return if the thread is not alive causes memory leaks. Neither doorbell_ or urilocator are released if the thread is not alive. This change alters the logic so regardless of the thread status the HostcallListener releases its memory. Change-Id: Ie912360ec0e2ee257de9937b1a8d7375e6aebd83
Dieser Commit ist enthalten in:
committet von
Aidan Belton-Schure
Ursprung
4e2fd192eb
Commit
f0063ba8da
@@ -334,15 +334,14 @@ void HostcallListener::consumePackets() {
|
||||
}
|
||||
|
||||
void HostcallListener::terminate() {
|
||||
if (thread_.state() < Thread::FINISHED && !amd::Os::isThreadAlive(thread_)) {
|
||||
return;
|
||||
}
|
||||
kHostThreadActive.state = Init::State::kExit;
|
||||
doorbell_->Reset(SIGNAL_DONE);
|
||||
if (thread_.state() >= Thread::FINISHED || amd::Os::isThreadAlive(thread_)) {
|
||||
kHostThreadActive.state = Init::State::kExit;
|
||||
doorbell_->Reset(SIGNAL_DONE);
|
||||
|
||||
// FIXME_lmoriche: fix termination handshake
|
||||
while (thread_.state() < Thread::FINISHED) {
|
||||
amd::Os::yield();
|
||||
// FIXME_lmoriche: fix termination handshake
|
||||
while (thread_.state() < Thread::FINISHED) {
|
||||
amd::Os::yield();
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren