https://bugs.winehq.org/show_bug.cgi?id=37669
--- Comment #25 from Sebastian Lackner sebastian@fds-team.de --- Thanks for tracking this down. I don't think its easily possible to introduce proper exception handling on the signal stack. Exceptions introduced while wine is in "kernel mode" have to be handled completely different, and should never be forwarded to debuggers or other exception handlers, so a simple SEH2 exception handler is not sufficient.
I don't think the problem with AcceptEx() is that hard to fix. If I didn't miss anything the patch I just added should be sufficient. Would you please test again?
https://github.com/wine-compholio/wine-staging/tree/master/patches/ws2_32-Wr...
The fix for NtReadFile is not complete unfortunately. Async handling of NtReadFile is handled in FILE_AsyncReadService(), and it should be changed there too (but you cannot use virtual_check_buffer_for_write because that is exception-based). In our Staging tree I have a patch to merge both functions, its part of the kernel32-NamedPipe patchset. I have rebased your changes on top of that.
https://github.com/wine-compholio/wine-staging/tree/master/patches/kernel32-... https://github.com/wine-compholio/wine-staging/tree/master/patches/ntdll-Wri...