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

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Feb 10 06:55:46 CST 2015


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

--- Comment #26 from Dmitry Timoshkov <dmitry at baikal.ru> ---
(In reply to Sebastian Lackner from comment #25)
> 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-
> WriteWatches

With that patch applied in addition to previous series now the application
crashes at (it's the match to the patched version)
http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ws2_32/socket.c#l2009
WS2_async_recv is called from WS2_async_accept_recv, which in turn
is another async callback of AcceptEx.

So, it's an improvement, the crash has moved to a later used code block.
But it's really a pain to track all this down, although I have specially
invented hacks to make my life a bit easier.

> The fix for NtReadFile is not complete unfortunately. Async handling of
> NtReadFile is handled in FILE_AsyncReadService(), and it should be changed
> there too

I didn't need an async part (and couldn't test the fix) since the app here
is reading from disk files, so I didn't bother with that.

-- 
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