Henri Verbeet : ntdll: Properly handle 0 returns from unw_step().
Alexandre Julliard
julliard at winehq.org
Tue Oct 22 16:57:02 CDT 2019
Module: wine
Branch: master
Commit: d82f06c07556408e9584d2a1f8b275df39c93d74
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d82f06c07556408e9584d2a1f8b275df39c93d74
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Oct 18 19:17:45 2019 +0330
ntdll: Properly handle 0 returns from unw_step().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/signal_arm64.c | 6 +++++-
dlls/ntdll/signal_x86_64.c | 7 ++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 43e5969229..d6d5f15c87 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -523,7 +523,11 @@ static NTSTATUS libunwind_virtual_unwind( ULONG_PTR ip, ULONG_PTR *frame, CONTEX
ip, (unsigned long)info.start_ip, (unsigned long)info.end_ip, (unsigned long)info.handler,
(unsigned long)info.lsda, (unsigned long)info.unwind_info );
- rc = unw_step( &cursor );
+ if (!(rc = unw_step( &cursor )))
+ {
+ WARN( "last frame\n" );
+ return STATUS_SUCCESS;
+ }
if (rc < 0)
{
WARN( "failed to unwind: %d\n", rc );
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 6508654e77..9645c5266c 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -1524,7 +1524,12 @@ static NTSTATUS libunwind_virtual_unwind( ULONG64 ip, BOOL* got_info, ULONG64 *f
ip, (unsigned long)info.start_ip, (unsigned long)info.end_ip, (unsigned long)info.handler,
(unsigned long)info.lsda, (unsigned long)info.unwind_info );
- rc = unw_step(&cursor);
+ if (!(rc = unw_step( &cursor )))
+ {
+ WARN( "last frame\n" );
+ *got_info = FALSE;
+ return STATUS_SUCCESS;
+ }
if (rc < 0)
{
WARN( "failed to unwind: %d\n", rc );
More information about the wine-cvs
mailing list