Piotr Caban : msvcrt: Destroy thrown c++ object before calling handler in _except_handler4_common.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 18 08:33:04 CDT 2016
Module: wine
Branch: master
Commit: 4a397b4009e9fd5e9e8899456d177865af465291
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a397b4009e9fd5e9e8899456d177865af465291
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Mar 18 12:40:33 2016 +0100
msvcrt: Destroy thrown c++ object before calling handler in _except_handler4_common.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/except_i386.c | 2 ++
dlls/msvcrt/msvcrt.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c
index 7d7ec75..418c68b 100644
--- a/dlls/msvcrt/except_i386.c
+++ b/dlls/msvcrt/except_i386.c
@@ -950,6 +950,8 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void),
if (retval == EXCEPTION_EXECUTE_HANDLER)
{
+ __DestructExceptionObject(rec);
+
/* Unwind all higher frames, this one will handle the exception */
_global_unwind2((EXCEPTION_REGISTRATION_RECORD*)frame);
msvcrt_local_unwind4( cookie, frame, trylevel, &frame->_ebp );
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index fafdc6b..b564dc1 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -219,6 +219,7 @@ typedef struct
BOOL __cdecl __CxxRegisterExceptionObject(EXCEPTION_RECORD**, cxx_frame_info*);
void __cdecl __CxxUnregisterExceptionObject(cxx_frame_info*, BOOL);
+void CDECL __DestructExceptionObject(EXCEPTION_RECORD*);
/* TLS data */
extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list