Hi Peter, I'm guessing the fact that no one has replied means that no one has a strong opinion, or no one feels qualified to answer, or that AJ would prefer to see a patch first. I'll give my opinion in the hope of stimulating discussion, as I think it's important.
- 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? --Juan
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Juan Lang wrote:
- 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:
- This would allow the test to pass, that is, we could successfully return STATUS_ACCESS_VIOLATION in this case.
- 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?
- 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