On Sat Jul 4 20:48:15 2026 +0000, Ivan Savinov wrote:
Added receive-side verification: the test now reads everything back on the peer socket and checks both the total size and the byte content (each buffer carries a distinct byte value, so reordering or dropped tails would be caught). Regarding limiting this to stream sockets: for SOCK_STREAM a short send is transparent — the clamped tail is resent by the short-write handling and the byte stream on the wire is unchanged. For message-oriented sockets each sendmsg() produces one datagram, so clamping the iovec count would split a single datagram into several, changing what appears on the wire. Supporting >IOV_MAX buffers for datagrams would instead require coalescing the payload into a temporary buffer, which seemed better left to a separate change if there's demand — the real-world breakage here was on stream sockets (gRPC's HTTP/2 transport batching one WSABUF per frame slice). Added a todo_wine test documenting the datagram case as well: native WSASendTo() with 2000 one-byte WSABUFs sends a single 2000-byte datagram, while Wine fails with WSAEMSGSIZE — the clamp deliberately doesn't apply to message-oriented sockets, since it would split the datagram. A proper fix there would require coalescing the payload into a temporary buffer, which I'd prefer to leave for a separate change.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11316#note_144883