mirror of
https://github.com/reactos/wine.git
synced 2025-01-21 03:15:18 +00:00
kernel32: Remove the no-exec fault workaround, it shouldn't be needed anymore.
This commit is contained in:
parent
eee2c4a4ab
commit
0f6e826fe0
@ -418,33 +418,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.@)
|
||||
*/
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user