[Bug 37669] Resetting a write watch can cause memory access violation in kernel

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Dec 4 09:17:37 CST 2014


https://bugs.winehq.org/show_bug.cgi?id=37669

--- Comment #6 from Dmitry Timoshkov <dmitry at baikal.ru> ---
(In reply to Sebastian Lackner from comment #5)
> > (In reply to Sebastian Lackner from comment #2)
> > > If I understand you correctly we already have a patch for that:
> > > https://github.com/wine-compholio/wine-staging/blob/master/patches/ws2_32-
> > > WriteWatches/0001-ws2_32-Avoid-race-conditions-of-async-WSARecv-operat.patch
> > 
> > This approach may lead to infinite retries if recvmsg will legitimately fail
> > for an invalid buffer due to not write watch related activities in another
> > thread.
> 
> I know, but your solution with copying memory has other disadvantages. I am
> not sure if allocating large amounts of memory (and then copying with an
> exception handler) is really better. Chances are relatively small that this
> will loop forever. Unfortunately there is no really perfect solution.

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.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list