[PATCH 0/1] MR9836: wow64: Only compare the valid segment selector part
VARA.exe (Visual Basic 6 application) needs this on ARM64, as there can be garbage in the upper words of the segments. The garbage seems to get there through calls to NtRaiseException. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9836
From: André Zwing <nerv@dawncrow.de> --- dlls/wow64/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 93cfd4fbb3f..64d445af090 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -239,7 +239,7 @@ static void __attribute__((used)) call_user_exception_dispatcher( EXCEPTION_RECO RtlGetExtendedContextLength( flags, &context_length ); - esp = ctx.SegSs != ss32_sel ? NtCurrentTeb32()->SystemReserved1[0] : ctx.Esp; + esp = LOWORD(ctx.SegSs) != ss32_sel ? NtCurrentTeb32()->SystemReserved1[0] : ctx.Esp; stack = (struct exc_stack_layout32 *)ULongToPtr( (esp - offsetof(struct exc_stack_layout32, context) - context_length) & ~3 ); stack->rec_ptr = PtrToUlong( &stack->rec ); stack->context_ptr = PtrToUlong( &stack->context ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9836
participants (2)
-
André Zwing -
André Zwing (@AndreRH)