Commit ee5e0659 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix i386 rethrown exceptions handling.

When __CxxRegisterExceptionObject was used and there was no catch_function_nested_handler frame to rewind nested_frame.frame_info.rec was incorrectly set to current exception. Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8c00ee2a
......@@ -447,7 +447,9 @@ static inline void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame
TRACE("found catch(...) block\n");
}
__CxxRegisterExceptionObject(&rec, &nested_frame.frame_info);
/* Add frame info here so exception is not freed inside RtlUnwind call */
_CreateFrameInfo(&nested_frame.frame_info.frame_info,
(void*)rec->ExceptionInformation[1]);
/* unwind the stack */
RtlUnwind( catch_frame ? catch_frame : &frame->frame, 0, rec, 0 );
......
......@@ -217,6 +217,7 @@ typedef struct
void *unk;
} cxx_frame_info;
frame_info* __cdecl _CreateFrameInfo(frame_info *fi, void *obj);
BOOL __cdecl __CxxRegisterExceptionObject(EXCEPTION_RECORD**, cxx_frame_info*);
void __cdecl __CxxUnregisterExceptionObject(cxx_frame_info*, BOOL);
void CDECL __DestructExceptionObject(EXCEPTION_RECORD*);
......
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