[PATCH 5/6] ntdll: Fill the I/O status block with the results of the send_socket call in sock_send().

Alexandre Julliard julliard at winehq.org
Mon Jul 26 11:35:58 CDT 2021


Zebediah Figura <zfigura at codeweavers.com> writes:

> The server might change the status. In particular, if we got a short but nonzero
> write on a nonblocking socket, try_send() would return STATUS_DEVICE_NOT_READY
> and hence leave the I/O status block unfilled. The server subsequently massages
> this into STATUS_SUCCESS, causing a garbage size to be eventually returned from
> ws2_32 send().
>
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51439
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
> Despite the comment, I'd open to filling the IOSB in sock_transmit() anyway.
>
>  dlls/ntdll/unix/socket.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)

This breaks the tests:

tools/runtest -q -P wine -T . -M ws2_32.dll -p dlls/ws2_32/tests/ws2_32_test.exe sock && touch dlls/ws2_32/tests/sock.ok
sock.c:2422: Tests skipped: SOCK_RAW is not supported
sock.c:2472: Tests skipped: IPX is not supported
sock.c:8408: Tests skipped: Cannot test SIO_ADDRESS_LIST_CHANGE, interactive tests must be enabled
sock.c:5084: Test failed: got error 0
sock.c:5084: Test failed: got error 0
make: *** [Makefile:144069: dlls/ws2_32/tests/sock.ok] Error 2

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list