From: Paul Gofman <pgofman@codeweavers.com> --- dlls/ntdll/signal_x86_64.c | 1 + dlls/ntdll/tests/exception.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 3d4bd23e8ff..0404433db6c 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -885,6 +885,7 @@ ULONG WINAPI RtlWalkFrameChain( void **buffer, ULONG count, ULONG flags ) for (i = 0; i < count; i++) { func = RtlLookupFunctionEntry( context.Rip, &base, &table ); + if (!func) break; if (RtlVirtualUnwind2( UNW_FLAG_NHANDLER, base, context.Rip, func, &context, NULL, &data, &frame, NULL, NULL, NULL, &handler, 0 )) break; diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 226e446989f..24b4215315f 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -6364,7 +6364,7 @@ static void test_base_init_thunk_unwind(void) ok( count == 2, "got count %lu.\n", count ); } -static void test_backtrace_without_runtime_function_func( BOOL todo ) +static void WINAPI test_backtrace_without_runtime_function_func( BOOL todo ) { unsigned int count; void *addrs[256]; @@ -6424,7 +6424,7 @@ static void test_backtrace_without_runtime_function(void) memcpy( code_mem, test_code, sizeof(test_code) ); func = code_mem; - func( TRUE ); + func( FALSE ); memcpy( (char *)code_mem + 0x1000, unwind_info, sizeof(unwind_info) ); rt_func.BeginAddress = 0; @@ -6443,7 +6443,7 @@ static void test_backtrace_without_runtime_function(void) ret = RtlInstallFunctionTableCallback( table, (ULONG_PTR)code_mem, 2048, &test_backtrace_without_runtime_function_callback, (PVOID*)&count, NULL ); ok( ret, "RtlInstallFunctionTableCallback failed.\n" ); - func( TRUE ); + func( FALSE ); todo_wine ok( !count, "got %d.\n", count ); ret = pRtlDeleteFunctionTable( (PRUNTIME_FUNCTION)table ); ok( ret, "RtlDeleteFunctionTable failed.\n" ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9944