ntdll: Properly handle 0 returns from unw_step().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-10-18 18:59:45 +03:30 committed by Alexandre Julliard
parent aa482426dc
commit d82f06c075
2 changed files with 11 additions and 2 deletions

View File

@ -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, ip, (unsigned long)info.start_ip, (unsigned long)info.end_ip, (unsigned long)info.handler,
(unsigned long)info.lsda, (unsigned long)info.unwind_info ); (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) if (rc < 0)
{ {
WARN( "failed to unwind: %d\n", rc ); WARN( "failed to unwind: %d\n", rc );

View File

@ -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, ip, (unsigned long)info.start_ip, (unsigned long)info.end_ip, (unsigned long)info.handler,
(unsigned long)info.lsda, (unsigned long)info.unwind_info ); (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) if (rc < 0)
{ {
WARN( "failed to unwind: %d\n", rc ); WARN( "failed to unwind: %d\n", rc );