https://bugs.winehq.org/show_bug.cgi?id=37669
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Dmitry Timoshkov from comment #8)
That's a minor problem IMHO, any other async operation or operation on a memory buffer that may be invalidated by another thread while the operation is in progress can cause this kind of a problem. But that situation should be found and analyzed first. The SEH handler just hides the bug and may lead to hardly diagnosabe bugs. It would be better IMO let it crash instead of silently eating an exception. Anyway that would qualify as an application bug IMHO.
I don't agree, it could cause regressions. At the moment recvmsg just fails with EFAULT, but when you replace that with your suggested solution it will crash. As mentioned before, on Windows passing invalid pointers to WSA functions doesn't cause an exception.