mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-08 16:12:23 +02:00
handle_signal() called ThreadData::the() which can acquire a write lock on s_thread_data_lock if the thread hasn't initialized its ThreadData yet. If the signal interrupts a thread that already holds a read lock on s_thread_data_lock (e.g. in unregister_notifier()), this deadlocks — the write lock waits for the read lock, but the read lock holder is blocked in the signal handler. Fix by accessing the thread-local s_this_thread_data directly. If the thread has no ThreadData, there's no wake pipe to write to, so we just return.
23 KiB
23 KiB