https://bugs.winehq.org/show_bug.cgi?id=54094
Bug ID: 54094 Summary: kernel32:process - test_services_exe() sometimes fails due to an invalid buffer size in Windows Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
test_services_exe() sometimes fails due to an invalid buffer size in Windows:
process.c:4962: Test failed: got 0xc0000004
See https://test.winehq.org/data/patterns.html#kernel32:process
Where 0xc0000004 == STATUS_INFO_LENGTH_MISMATCH
This causes a little bit over one failure per month.
I think the failure simply happens when a process is started between the first call to NtQuerySystemInformation(), which returns the buffer size to hold the *array* of SYSTEM_PROCESS_INFORMATION structures, and the time we call it again with that size. Obviously we don't start new processes ourselves so it must be a scheduled task or some equivalent.
We should probably loop a couple of times to defend against that.