Peter Beutner : msvcrt: Fix handling of multiple nested exceptions.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 22 05:44:06 CST 2006
Module: wine
Branch: refs/heads/master
Commit: be07b6db594d279a3391b7fb5af8048dcd78473b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=be07b6db594d279a3391b7fb5af8048dcd78473b
Author: Peter Beutner <p.beutner at gmx.net>
Date: Wed Feb 22 12:06:56 2006 +0100
msvcrt: Fix handling of multiple nested exceptions.
Save in each nested frame a pointer to the original exception record.
Only one refence in thread_data isn't enough when we have multiple
nested frames.
---
dlls/msvcrt/cppexcept.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/cppexcept.c
index d42e88e..3f28166 100644
--- a/dlls/msvcrt/cppexcept.c
+++ b/dlls/msvcrt/cppexcept.c
@@ -229,6 +229,7 @@ struct catch_func_nested_frame
cxx_exception_frame *cxx_frame; /* frame of parent exception */
cxx_function_descr *descr; /* descriptor of parent exception */
int trylevel; /* current try level */
+ EXCEPTION_RECORD *rec; /* rec associated with frame */
};
/* handler for exceptions happening while calling a catch function */
@@ -247,7 +248,7 @@ static DWORD catch_function_nested_handl
if(rec->ExceptionCode == CXX_EXCEPTION)
{
- PEXCEPTION_RECORD prev_rec = msvcrt_get_thread_data()->exc_record;
+ PEXCEPTION_RECORD prev_rec = nested_frame->rec;
if(rec->ExceptionInformation[1] == 0 && rec->ExceptionInformation[2] == 0)
{
/* exception was rethrown */
@@ -330,6 +331,7 @@ inline static void call_catch_block( PEX
nested_frame.cxx_frame = frame;
nested_frame.descr = descr;
nested_frame.trylevel = nested_trylevel + 1;
+ nested_frame.rec = rec;
__wine_push_frame( &nested_frame.frame );
thread_data->exc_record = rec;
More information about the wine-cvs
mailing list