[Bug 42377] WSASend() returns invalid number of bytes when both lpOverlapped and lpNumberOfBytesSent

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Feb 5 02:35:29 CST 2017


https://bugs.winehq.org/show_bug.cgi?id=42377

--- Comment #10 from Bruno Jesus <00cpxxx at gmail.com> ---
With great help from Sebastian Lackner we got a bit further. Wine is not
writing the wrong number of bytes. The problem (so far) is that the Go app is
receiving the WSASend notification of the previous call on the current call.

Example (with extra debug added):

====Previous WSASend call====
WS2_sendto socket 00e8, wsabuf 0x5b4a056c, nbufs 1, flags 0, to (nil), tolen 0,
ovl 0x5b4a0540, func (nil)
WS2_sendto fd=54, options=0
WS2_sendto WS_AddCompletion 0xe8, cvalue 5b4a0540, sent = 32
WS2_sendto  -> 32 bytes (no overlap necessary)

====Current WSASend call====
WS2_sendto socket 00e8, wsabuf 0x5b4a056c, nbufs 1, flags 0, to (nil), tolen 0,
ovl 0x5b4a0540, func (nil)
WS2_sendto fd=54, options=0
WS2_sendto WS_AddCompletion 0xe8, cvalue 5b4a0540, sent = 33
WS2_sendto  -> 33 bytes (no overlap necessary)

====Go error====
WSASend: fd: 232, buf: {Len:33 Buf:0x5b4fc000}, qty: 32, len: 33, o:
{Internal:0 InternalHigh:33 Offset:0 OffsetHigh:0 HEvent:0}, e: <nil>, r1: 0,
e1: 0
WSASend1: ExecIO returns1: qty: 32, origlen: 33, buflen: 33

Note that qty = 32 (previous call) while expected sent = 33 (current call)

The reasons are not known yet. lpNumberOfBytesSent is correct, but not used by
Go which always wait for the completion notification.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list