[PATCH 0/1] MR4575: server: Check socket flags after all sockets got processed
In rare cases we get an event during the second iteration of the loop, changing the first element. This would lead to an assertion later. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55054 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4575
From: Fabian Maurer <dark.shadow4(a)web.de> In rare cases we get an event during the second iteration of the loop, changing the first element. This would lead to an assertion later. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55054 --- server/sock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/sock.c b/server/sock.c index bd441d822a8..84c0d4a4931 100644 --- a/server/sock.c +++ b/server/sock.c @@ -3509,7 +3509,10 @@ static void poll_socket( struct sock *poll_sock, struct async *async, int exclus req->sockets[i].flags |= AFD_POLL_CONNECT_ERR; req->sockets[i].status = sock_get_ntstatus( sock->errors[AFD_POLL_BIT_CONNECT_ERR] ); } + } + for (i = 0; i < count; ++i) + { if (req->sockets[i].flags) signaled = TRUE; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4575
There's a new failure in ws2_32:sock, but that can't be related to polling, and probably just needs the timeout in line 7101 to be higher. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4575#note_54627
This merge request was approved by Zebediah Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4575
participants (3)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44) -
Zebediah Figura (@zfigura)