+7
−1
+7
−1
+7
−1
Loading
Every worker's poll object appends its listener to the file-static
SSOCKETS, and nothing ever removed them. cleanupConnections() copied the
list, so a later event loop in the same process closed the listeners of
an earlier one again -- after those sockets were gone (use-after-free;
idle_reaper_test segfaulted at exit in its third scenario).
cleanupConnections() now takes the list (swap) and closes each listener
once (every worker thread registered it). Same in poll.cpp and kqueue.cpp.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>