Alexandre Julliard : kernel32: Remove the no-exec fault workaround, it shouldn't be needed anymore.
Alexandre Julliard
julliard at winehq.org
Wed Dec 5 06:56:44 CST 2007
Module: wine
Branch: master
Commit: 0f6e826fe02611f7c033405041888d6e083512d8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f6e826fe02611f7c033405041888d6e083512d8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Dec 5 12:35:47 2007 +0100
kernel32: Remove the no-exec fault workaround, it shouldn't be needed anymore.
---
dlls/kernel32/except.c | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c
index 0817d23..21d3584 100644
--- a/dlls/kernel32/except.c
+++ b/dlls/kernel32/except.c
@@ -419,33 +419,6 @@ static inline BOOL check_resource_write( void *addr )
/*******************************************************************
- * check_no_exec
- *
- * Check for executing a protected area.
- */
-static inline BOOL check_no_exec( void *addr )
-{
- MEMORY_BASIC_INFORMATION info;
-
- if (!VirtualQuery( addr, &info, sizeof(info) )) return FALSE;
- if (info.State == MEM_FREE) return FALSE;
-
- /* prot |= PAGE_EXECUTE would be a lot easier, but MS developers
- * apparently don't grasp the notion of protection bits */
- switch(info.Protect)
- {
- case PAGE_READONLY: info.Protect = PAGE_EXECUTE_READ; break;
- case PAGE_READWRITE: info.Protect = PAGE_EXECUTE_READWRITE; break;
- case PAGE_WRITECOPY: info.Protect = PAGE_EXECUTE_WRITECOPY; break;
- default: return FALSE;
- }
- /* FIXME: we should probably have a per-app option, and maybe a message box */
- FIXME( "No-exec fault triggered at %p, enabling work-around\n", addr );
- return VirtualProtect( addr, 1, info.Protect, NULL );
-}
-
-
-/*******************************************************************
* UnhandledExceptionFilter (KERNEL32.@)
*/
LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS epointers)
@@ -460,10 +433,6 @@ LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS epointers)
if (check_resource_write( (void *)rec->ExceptionInformation[1] ))
return EXCEPTION_CONTINUE_EXECUTION;
break;
- case EXCEPTION_EXECUTE_FAULT:
- if (check_no_exec( (void *)rec->ExceptionInformation[1] ))
- return EXCEPTION_CONTINUE_EXECUTION;
- break;
}
}
More information about the wine-cvs
mailing list