https://bugs.winehq.org/show_bug.cgi?id=37669
--- Comment #8 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Sebastian Lackner from comment #7)
There is no need for an exception handler, it works just fine without it. Regarding memory allocation: there are many other places in Wine that create intermediate buffers with the caller specified sizes.
No, you'll need at least an SEH exception handler. On Windows its "valid" to release the memory while the async call is still pending or pass an invalid pointer to the winsock functions.
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.