Gabriel Ivăncescu : ntdll: Do not override existing context's RAX when dispatching user APC on x86_64.
Alexandre Julliard
julliard at winehq.org
Fri Jan 8 15:04:54 CST 2021
Module: wine
Branch: master
Commit: 22dba3f0fb60c5e477d7b876ce744b878c98f89b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=22dba3f0fb60c5e477d7b876ce744b878c98f89b
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Fri Jan 8 20:26:16 2021 +0200
ntdll: Do not override existing context's RAX when dispatching user APC on x86_64.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/signal_x86_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 1fd26d5bd76..cccbfc2a3be 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -2049,6 +2049,7 @@ struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *conte
{
c.ContextFlags = CONTEXT_FULL;
NtGetContextThread( GetCurrentThread(), &c );
+ c.Rax = STATUS_USER_APC;
context = &c;
}
memmove( &stack->context, context, sizeof(stack->context) );
@@ -2076,7 +2077,6 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher,
"call " __ASM_NAME("setup_user_apc_dispatcher_stack") "\n\t"
"movq %rax,%rsp\n\t"
"leaq 0x30(%rsp),%rcx\n\t" /* context */
- "movq $0xc0,0x78(%rcx)\n\t" /* context.Rax = STATUS_USER_APC */
"movq %r12,%rdx\n\t" /* ctx */
"movq %r13,%r8\n\t" /* arg1 */
"movq %r14,%r9\n" /* arg2 */
More information about the wine-cvs
mailing list