Commit 3c3cf47a authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Also check for data execution on x86-64.

It can still be disabled from Wow64.
parent a3ff624b
...@@ -2010,6 +2010,15 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) ...@@ -2010,6 +2010,15 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext )
leave_handler( ucontext ); leave_handler( ucontext );
return; return;
} }
if (rec.ExceptionCode == EXCEPTION_ACCESS_VIOLATION &&
rec.ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT)
{
ULONG flags;
NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags,
&flags, sizeof(flags), NULL );
/* send EXCEPTION_EXECUTE_FAULT only if data execution prevention is enabled */
if (!(flags & MEM_EXECUTE_OPTION_DISABLE)) rec.ExceptionInformation[0] = EXCEPTION_READ_FAULT;
}
break; break;
case TRAP_x86_ALIGNFLT: /* Alignment check exception */ case TRAP_x86_ALIGNFLT: /* Alignment check exception */
if (EFL_sig(ucontext) & 0x00040000) if (EFL_sig(ucontext) & 0x00040000)
......
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