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>
oldstable
Piotr Caban 2016-04-07 15:36:32 +02:00 committed by Alexandre Julliard
parent 8c00ee2ac6
commit ee5e06591f
2 changed files with 4 additions and 1 deletions

View File

@ -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 );

View File

@ -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*);