From c0012ecdd79a698f2ddca9bdcd5e6bbf5a0fcf53 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 18 Jun 2021 13:49:03 +0200 Subject: [PATCH] ntdll: Ignore faults caused by alignment check on x86-64. Signed-off-by: Alexandre Julliard --- dlls/ntdll/unix/signal_x86_64.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index c36699589d9..2cd133a1087 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2280,6 +2280,11 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) if (!rec.ExceptionCode) return; break; case TRAP_x86_ALIGNFLT: /* Alignment check exception */ + if (EFL_sig(ucontext) & 0x00040000) + { + EFL_sig(ucontext) &= ~0x00040000; /* reset AC flag */ + return; + } rec.ExceptionCode = EXCEPTION_DATATYPE_MISALIGNMENT; break; default: