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: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8c00ee2ac6
commit
ee5e06591f
|
@ -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*);
|
||||
|
|
Loading…
Reference in New Issue