[PATCH] ntdll: Don't reset rsp to context->Rsp until exception data is copied.

Alexandre Julliard julliard at winehq.org
Thu Jul 2 04:55:33 CDT 2020


Paul Gofman <pgofman at codeweavers.com> writes:

> On 7/2/20 12:09, Alexandre Julliard wrote:
>> Paul Gofman <pgofman at codeweavers.com> writes:
>>
>>> Context record may be stored on stack below context stack. This
>>> happens, e. g., with RtlRaiseException().
>> That doesn't seem right, there may be other things on the stack too. Is
>> there a reason to switch stack to context->Rsp at all?
>>
> Exception unwinding does not work otherwise, and that matches stack
> layout on Windows: the context and exception record on stack has a fixed
> gap after context's Rsp. But it looks we don't need anything else from
> the stack besides the context, or am I missing something?

Potentially the exception record, if we allow things to be below
context->Rsp. Maybe RtlRaiseException is not setting the right Rsp?
This could use a few more tests.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list