[PATCH 4/5] vcruntime140_1: Unwind state 0.
Daniel Lehman
dlehman25 at gmail.com
Tue Jun 2 20:56:16 CDT 2020
Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
---
'last' points to state 0 so the (unwind_data > last) stops too soon
and a handler for state 0 is skipped
void throw_int(int x)
{
test t(0xcafef00d); /* at 0 */
throw x;
}
void test_unwind_to_minus_one(void)
{
try {
throw_int(42);
} catch(int i) {
printf("catch %d\n", i);
}
}
---
dlls/vcruntime140_1/except_x86_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/vcruntime140_1/except_x86_64.c b/dlls/vcruntime140_1/except_x86_64.c
index ef171a5f6c..f10c67c573 100644
--- a/dlls/vcruntime140_1/except_x86_64.c
+++ b/dlls/vcruntime140_1/except_x86_64.c
@@ -426,7 +426,7 @@ static void cxx_local_unwind4(ULONG64 frame, DISPATCHER_CONTEXT *dispatch,
}
unwind_data = rva_to_ptr(descr->unwind_map, dispatch->ImageBase);
- last = unwind_data;
+ last = unwind_data - 1;
for (i = 0; i < trylevel; i++)
{
BYTE *addr = unwind_data;
--
2.17.1
More information about the wine-devel
mailing list