ntdll: Report SegDs to be identical to SegSs in x86_64 exception handlers.

Based on a patch by Dávid Török.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-03-28 17:08:31 -05:00 committed by Alexandre Julliard
parent 10d7a804c1
commit 195c57eeb7
2 changed files with 5 additions and 1 deletions

View File

@ -567,6 +567,10 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
context->R12, context->R13, context->R14, context->R15 );
}
/* Legends of Runeterra depends on having SegDs == SegSs in an exception
* handler. */
context->SegDs = context->SegSs;
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
NtContinue( context, FALSE );

View File

@ -3020,7 +3020,7 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
"%u: Unexpected exception address %p/%p\n", entry,
rec->ExceptionAddress, (char*)context->Rip );
todo_wine ok( context->SegDs == context->SegSs,
ok( context->SegDs == context->SegSs,
"%u: ds %#x does not match ss %#x\n", entry, context->SegDs, context->SegSs );
todo_wine ok( context->SegEs == context->SegSs,
"%u: es %#x does not match ss %#x\n", entry, context->SegEs, context->SegSs );