Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f1d307ca
Commit
f1d307ca
authored
Jun 14, 2017
by
Daniel Lehman
Committed by
Alexandre Julliard
Jun 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Only unwind current catch block when handling nested exception.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57266eec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
except_x86_64.c
dlls/msvcrt/except_x86_64.c
+9
-19
No files found.
dlls/msvcrt/except_x86_64.c
View file @
f1d307ca
...
...
@@ -306,7 +306,7 @@ static void cxx_local_unwind(ULONG64 frame, DISPATCHER_CONTEXT *dispatch,
}
TRACE
(
"current level: %d, last level: %d
\n
"
,
trylevel
,
last_level
);
while
(
trylevel
!=
last_level
)
while
(
trylevel
>
last_level
)
{
if
(
trylevel
<
0
||
trylevel
>=
descr
->
unwind_count
)
{
...
...
@@ -321,7 +321,7 @@ static void cxx_local_unwind(ULONG64 frame, DISPATCHER_CONTEXT *dispatch,
}
trylevel
=
unwind_table
[
trylevel
].
prev
;
}
unwind_help
[
0
]
=
last_
level
;
unwind_help
[
0
]
=
try
level
;
}
static
LONG
CALLBACK
cxx_rethrow_filter
(
PEXCEPTION_POINTERS
eptrs
,
void
*
c
)
...
...
@@ -512,6 +512,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
DWORD
throw_func_off
;
void
*
throw_func
;
UINT
i
,
j
;
int
unwindlevel
=
-
1
;
if
(
descr
->
magic
<
CXX_FRAME_MAGIC_VC6
||
descr
->
magic
>
CXX_FRAME_MAGIC_VC8
)
{
...
...
@@ -545,6 +546,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
if
(
rva_to_ptr
(
catchblock
->
handler
,
dispatch
->
ImageBase
)
==
throw_func
)
{
TRACE
(
"nested exception detected
\n
"
);
unwindlevel
=
tryblock
->
end_level
;
orig_frame
=
*
(
ULONG64
*
)
rva_to_ptr
(
catchblock
->
frame
,
frame
);
TRACE
(
"setting orig_frame to %lx
\n
"
,
orig_frame
);
}
...
...
@@ -554,23 +556,11 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
if
(
rec
->
ExceptionFlags
&
(
EH_UNWINDING
|
EH_EXIT_UNWIND
))
{
if
(
cxx_is_consolidate
(
rec
))
{
if
(
rec
->
ExceptionFlags
&
EH_TARGET_UNWIND
)
{
const
cxx_function_descr
*
orig_descr
=
(
void
*
)
rec
->
ExceptionInformation
[
2
];
int
end_level
=
rec
->
ExceptionInformation
[
3
];
orig_frame
=
rec
->
ExceptionInformation
[
1
];
cxx_local_unwind
(
orig_frame
,
dispatch
,
orig_descr
,
end_level
);
}
else
if
(
frame
==
orig_frame
)
cxx_local_unwind
(
frame
,
dispatch
,
descr
,
-
1
);
return
ExceptionContinueSearch
;
}
if
(
frame
==
orig_frame
)
cxx_local_unwind
(
frame
,
dispatch
,
descr
,
rec
->
ExceptionFlags
&
EH_TARGET_UNWIND
?
trylevel
:
-
1
);
if
(
rec
->
ExceptionFlags
&
EH_TARGET_UNWIND
)
cxx_local_unwind
(
orig_frame
,
dispatch
,
descr
,
cxx_is_consolidate
(
rec
)
?
rec
->
ExceptionInformation
[
3
]
:
trylevel
);
else
cxx_local_unwind
(
orig_frame
,
dispatch
,
descr
,
unwindlevel
);
return
ExceptionContinueSearch
;
}
if
(
!
descr
->
tryblock_count
)
return
ExceptionContinueSearch
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment