[PATCH 0/2] MR127: ws2_32: Make wait in select alertable

Jacek Caban jacek at codeweavers.com
Wed May 25 10:48:03 CDT 2022


On 5/25/22 17:36, Paul Gofman wrote:
> On 5/25/22 10:28, Jacek Caban wrote:
>> On 5/25/22 04:00, Paul Gofman (@gofman) wrote:
>>> 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.
>>
>>
>> On Windows, asyncs are terminated when owning thread is terminated. 
>> If we supported that and made sure that it happens before thread 
>> stack is deallocated, it should solve the problem.
>>
>>
>> Jacek
>>
>>
> Do you mean, e. g., if a thread has called an overlapped 
> DeviceIoControl() (or queued other overlapped IO) and exited, the 
> other thread waiting for it to complete, e. g., with 
> GetOverlappedResult() or waiting for event it will never get the 
> completion?


I think that wait should complete. It's been a while since I looked at 
it, but AFAIR it looked like we should do something like 
cancel_process_asyncs() for each thread separately.


Jacek




More information about the wine-devel mailing list