• Zebediah Figura's avatar
    ntdll: Avoid accessing the I/O status block in wait_async(). · 97afac46
    Zebediah Figura authored
    Steam uses WSASend() with completion ports, reusing OVERLAPPED structures as
    soon as they are returned from GetQueuedCompletionStatus(). Since completion is
    queued during the select request in wait_async(), the I/O status block can be
    reused even before the call to NtDeviceIoControl exits.
    
    This works fine with current Wine, because WSASend() doesn't access the I/O
    status block after queuing completion. However, a patch that changes it to use
    wait_async() like other async requests causes NtDeviceIoControlFile to
    consistently return garbage status codes.
    Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    97afac46
async.c 19.5 KB