Commit 0ac49a99 authored by Alexandre Julliard's avatar Alexandre Julliard

except_handler3: Set correct %ebp when calling exception filter.

parent ceb25b5b
......@@ -70,6 +70,14 @@ inline static void call_finally_block( void *code_block, void *base_ptr )
__asm__ __volatile__ ("movl %1,%%ebp; call *%%eax" \
: : "a" (code_block), "g" (base_ptr));
}
static DWORD call_filter( void *func, void *arg, void *ebp )
{
DWORD ret;
__asm__ __volatile__ ("pushl %%ebp; pushl %3; movl %2,%%ebp; call *%%eax; popl %%ebp; popl %%ebp"
: "=a" (ret) : "0" (func), "g" (ebp), "g" (arg) );
return ret;
}
#endif
static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec,
......@@ -206,7 +214,7 @@ int _except_handler3(PEXCEPTION_RECORD rec,
{
TRACE("filter = %p\n", pScopeTable[trylevel].lpfnFilter);
retval = pScopeTable[trylevel].lpfnFilter(&exceptPtrs);
retval = call_filter( pScopeTable[trylevel].lpfnFilter, &exceptPtrs, &frame->_ebp );
TRACE("filter returned %s\n", retval == EXCEPTION_CONTINUE_EXECUTION ?
"CONTINUE_EXECUTION" : retval == EXCEPTION_EXECUTE_HANDLER ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment