Re: [PATCH] ntdll/signal_i386.c: RtlCaptureContext locals + args are 12 bytes instead of 8 (return address + CONTEXT * arg + %eax local
Bernhard Loos <bernhardloos(a)googlemail.com> writes:
@@ -1181,7 +1181,7 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4, __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "popl 0xc0(%eax)\n\t" /* context->EFlags */ __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") - "leal 8(%esp),%edx\n\t" + "leal 0xc(%esp),%edx\n\t" "movl %edx,0xc4(%eax)\n\t" /* context->Esp */
That's not really more correct, it's supposed to return the caller frame but there's no good way of doing that. What are you trying to fix? -- Alexandre Julliard julliard(a)winehq.org
On Tue, Sep 27, 2011 at 4:33 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
Bernhard Loos <bernhardloos(a)googlemail.com> writes:
@@ -1181,7 +1181,7 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4, __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "popl 0xc0(%eax)\n\t" /* context->EFlags */ __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") - "leal 8(%esp),%edx\n\t" + "leal 0xc(%esp),%edx\n\t" "movl %edx,0xc4(%eax)\n\t" /* context->Esp */
That's not really more correct, it's supposed to return the caller frame but there's no good way of doing that. What are you trying to fix?
Nothing specific. I noticed this yesterday, while trying to use this function for RtlRaiseException, before you pointed out the register problem. Wouldn't it be better to rename this functions as it behaves differently then the windows version so apps get an actual error message instead of unexpected behavior?
-- Alexandre Julliard julliard(a)winehq.org
Bernhard Loos <bernhardloos(a)googlemail.com> writes:
Nothing specific. I noticed this yesterday, while trying to use this function for RtlRaiseException, before you pointed out the register problem.
Wouldn't it be better to rename this functions as it behaves differently then the windows version so apps get an actual error message instead of unexpected behavior?
Not really. Retrieving the exact stack pointer is unlikely to be all that useful anyway. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Bernhard Loos