LibCore: Prevent UAF on event loop wake handles on Windows

We were holding a reference to ThreadData, which could be destroyed
earlier than the EventLoop itself, causing other threads to UAF trying
to signal a wake.
This commit is contained in:
Zaggy1024
2026-02-27 08:20:13 -06:00
committed by Gregory Bertilson
parent 04e95b7dd1
commit 035b489266
Notes: github-actions[bot] 2026-03-02 23:09:07 +00:00
2 changed files with 2 additions and 1 deletions

View File

@@ -144,6 +144,7 @@ struct ThreadData {
EventLoopImplementationWindows::EventLoopImplementationWindows()
: m_wake_event(ThreadData::the()->wake_data->wait_event.handle)
{
VERIFY(m_wake_event);
}
EventLoopImplementationWindows::~EventLoopImplementationWindows()