WriteFile() segfaults...

Zebediah Figura z.figura12 at gmail.com
Mon Mar 5 13:16:00 CST 2018

On 05/03/18 12:53, Tom Watson wrote:
> Over the weekend I seem to have triggered a number of segfaults while
> writing tests by sending 0 as the optional bytes written parameter;
>    WriteFile(handle, buffer, sizeof(buffer), 0, NULL);
> Test patch/runs on testbot
> here: https://testbot.winehq.org/JobDetails.pl?Key=36430 
> I download the resulting .exe and ran it against current git source
> locally and it works fine.
> Is this a known issue? Something going on with testbot? Something I'm
> doing wrong? Or does it require some more investigation?
> Cheers.

Hello Tom,

The testbot runs each test against a Windows machine. On Windows, it's
not allowed to pass a NULL parameter in for the number of bytes written,
unless the overlapped parameter is used:

"This parameter can be NULL only when the lpOverlapped parameter is not

That this works on Wine is not really correct behaviour, but it's not
worth "fixing" either.


More information about the wine-devel mailing list