Problem with NtReadVirtualMemory and wine server connection

Vitaliy Margolen wine-devel at kievinfo.com
Wed Sep 27 19:52:53 CDT 2006


Juan Lang wrote:
>> 1. allocate a temporary buffer in NtReadVirtualMemory, read server
>> answer to this buffer, and then inside a try / catch block copy to
>> application memory
> 
> This would be my preference, for two reasons:
> 1. This would allow the test to pass, that is, we could successfully
>    return STATUS_ACCESS_VIOLATION in this case.
> 2. The server protocol appears to be robust enough, as it crashes the
>    client, not the server.  The problem is mapping the fault to an
>    NTSTATUS, and recovering from it.
> 
> The disadvantage may be that each server request would have to be checked
> whether it could fail in the same way.  Any other opinions?

>> 3. just fix the bug in winedbg and wait until a real world app needs this 
>> behavior. (of course i will send a patch for windbg even if one of the other 
>> ways is choosen)

I actually like this one (because I suggested it on IRC :). I don't see
any reason why we need to punish all correctly working applications
because of our own broken program? We should fix winedbg first and then
see if there are really any programs that depend on this behavior.

Vitaliy



More information about the wine-devel mailing list