--
v4: d3dx10/tests: Add a test for loading an invalid resource from a valid module.
d3dx10/tests: Initialize a function argument.
d3dx10/tests: Add D3DX10GetImageInfoFromMemory thread pump tests.
d3dx10: Support ID3DX10ThreadPump parameter in D3DX10GetImageInfoFromMemory.
d3dx10: Add support for ID3DX10ThreadPump parameter in D3DX10GetImageInfoFromResourceW.
d3dx10: Add support for ID3DX10ThreadPump parameter in D3DX10GetImageInfoFromResourceA.
d3dx10: Add support for ID3DX10ThreadPump parameter in D3DX10GetImageInfoFromFileW.
d3dx10/tests: Add D3DX10GetImageInfoFromMemory HRESULT argument tests.
d3dx10: Don't ignore HRESULT parameter in D3DX10GetImageInfoFrom* functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/205
Calling ioctl(..., SO_ERROR, ...) clears pending socket error. Because of that we may clear the error in poll_socket or IOCTL_AFD_GET_SO_ERROR. This leads to failures during Battle.net installation (it's a race that I can only reproduce on slow machines).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/225
Fixes V Rising hang on exit.
During exit the main thread wants to terminate the other thread by queuing APC which APC is supposed to raise an exception and abort the thread. That is basically how Unity / Mono aborts threads. The thread being terminated is calling select() in a loop and the wait in select() is currently not alertable (while they should be, as the test suggests).
But with the first patch the things may get more interesting. ws2_32.select() passes on stack io status block to NtDeviceIoControlFile(), then it is killed from APC while waiting for event to be signaled by ioctl async processing. Then, wineserver wants to complete the async. The async owner thread is already terminated and it delivers SIGUSR1 to process the system APC to the main thread. When the APC is processed from USR1 handler it segfaults trying to put the IO status to iosb pointing to already deallocated thread stack. This is segfault on signal stack and as such is unrecoverable. The process is left hanging.
Thus the second patch. In the ideal case we'd probably want to avoid crashing or handle segfault in system APC processing somehow, but I don't yet see a feasible way to do it. In theory the same may happen without ws2_32 if the app does the same, but I don't know that anything hits that case while ws2_32 queues those on stack iosbs, so avoiding that may probably avoid the practical issues.
--
v2: ws2_32: Make wait in WS2_recv_base() alertable.
ws2_32: Make wait in select() alertable.
https://gitlab.winehq.org/wine/wine/-/merge_requests/127