[PATCH] ntdll: Do not override existing context's EAX when dispatching user APC.

Paul Gofman pgofman at codeweavers.com
Fri Jan 8 11:40:43 CST 2021


On 1/8/21 20:29, Gabriel Ivăncescu wrote:
> Fixes a regression introduced by 175a3649ba04daaad3f2b5b62d6bfe091d6a9e46,
> which caused Winamp's in_wave module to crash when playing a wav file
> (the previous behavior only changed EAX when there was no context).
>
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
>  dlls/ntdll/unix/signal_i386.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
> index ff9d8a1..f2d58dc 100644
> --- a/dlls/ntdll/unix/signal_i386.c
> +++ b/dlls/ntdll/unix/signal_i386.c
> @@ -1696,6 +1696,7 @@ struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *conte
>      {
>          c.ContextFlags = CONTEXT_FULL;
>          NtGetContextThread( GetCurrentThread(), &c );
> +        c.Eax = STATUS_USER_APC;
>          context = &c;
>      }
>      memmove( &stack->context, context, sizeof(stack->context) );
> @@ -1704,7 +1705,6 @@ struct apc_stack_layout * WINAPI setup_user_apc_dispatcher_stack( CONTEXT *conte
>      stack->arg1 = arg1;
>      stack->arg2 = arg2;
>      stack->func = func;
> -    stack->context.Eax = STATUS_USER_APC;
>      return stack;
>  }
>  

Thanks for spotting this. Are you planning to do the same for x64?




More information about the wine-devel mailing list