From 5b75ec6a099b677ed52c0ba74319f727cf63afea Mon Sep 17 00:00:00 2001 From: Alysa Liu Date: Wed, 26 Nov 2025 19:22:57 -0500 Subject: [PATCH] rocr: Fix error when internal signal is destroyed (#1845) Fix error when we destroy internal signals during shutdown. Fix init dependency on uninitialized value. --- projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h | 2 +- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h index ec2e20a622..0327d6520a 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h @@ -682,10 +682,10 @@ class Runtime { }; struct AsyncEventsInfo { + bool monitor_exceptions; AsyncEventsControl control; AsyncEvents events; ConcurrentAsyncEvents new_events; - bool monitor_exceptions; AsyncEventsInfo(bool exceptions); ~AsyncEventsInfo(); diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index f80568e3b7..4fb260f953 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -2839,7 +2839,7 @@ void Runtime::AsyncEventsControl::Shutdown() { os::WaitForThread(thread_); os::CloseThread(thread_); thread_ = NULL; - HSA::hsa_signal_destroy(wake); + core::Signal::Convert(wake)->DestroySignal(); } void Runtime::AsyncEvents::PushBack(hsa_signal_t signal,