diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 43e59692299..d6d5f15c874 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 6508654e778..9645c5266c8 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 );