ntdll: Don't send EXCEPTION_EXECUTE_FAULT to Windows programs that didn't enable DEP.

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Sat Jul 25 12:58:18 CDT 2009


This is a way to fix the non-functional single-stepping in Delphi,
as reported for example in
 http://appdb.winehq.org/objectManager.php?sClass=version&iId=22&iTestingId=10795

If Delphi looses track on single stepping what module might contain the
next executed line, it write-protects a lot of pages to catch execution
flow. The exception handler unprotects used pages and sets breakpoints
to all interesting code locations in them if a EXCEPTION_READ_FAULT or
EXCEPTION_WRITE_FAULT occurs for these pages - it doesn't handle
EXCEPTION_EXECUTE_FAULT. As long as the force_exec mode is enabled
there is no data execution prevention - thus returning the compatible
EXCEPTION_READ_FAULT seems appropriate.
---
 dlls/ntdll/ntdll_misc.h  |    1 +
 dlls/ntdll/signal_i386.c |    7 +++++++
 dlls/ntdll/virtual.c     |    9 +++++++++
 3 files changed, 17 insertions(+), 0 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Don-t-send-EXCEPTION_EXECUTE_FAULT-to-Windows-.patch
Type: text/x-patch
Size: 2204 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090725/89ddd4a2/attachment.bin>


More information about the wine-patches mailing list