mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
If exit() is called on a thread with an EventLoop in the stack, the ThreadData storing the array of wake pipes will be destroyed first. Threads can still take a strong reference to the EventLoop after that, and will read the fds from freed memory. Instead, take a copy of the write fd, and swallow EBADF when writing to it, since that only indicates that the thread and event loop are exiting, so there's nothing to do with the wake.
1.9 KiB
1.9 KiB