From: Rémi Bernon rbernon@codeweavers.com
This assumes that DF is cleared by unix call, which should be guaranteed by the SYSV ABI, and only needs to be restored if it was set on entry. --- dlls/ntdll/unix/signal_x86_64.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 775949092b6..9e867d5adf7 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2845,8 +2845,11 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "jnz .L__wine_syscall_dispatcher_control_restore\n\t" __ASM_CFI(".cfi_remember_state\n\t") "movq 0x80(%rcx),%r11\n\t" /* frame->eflags */ + "testl $0x204400,%r11d\n\t" /* DF NT ID are preserved */ + "jz .L__wine_syscall_dispatcher_skip_rflags\n\t" "pushq %r11\n\t" "popfq\n\t" + "\n.L__wine_syscall_dispatcher_skip_rflags:\n\t" "movq 0x88(%rcx),%rsp\n\t" __ASM_CFI(".cfi_def_cfa rsp, 0\n\t") __ASM_CFI(".cfi_same_value rsp\n\t")