Commit 0f6e826f authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Remove the no-exec fault workaround, it shouldn't be needed anymore.

parent eee2c4a4
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment