From 0c211b975f9532875bfa79c8f8949832c6aee4b9 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 20 Aug 2022 21:41:10 +0200 Subject: [PATCH] [RTL] Fixes for RtlpUnwindInternal --- sdk/lib/rtl/amd64/unwind.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/lib/rtl/amd64/unwind.c b/sdk/lib/rtl/amd64/unwind.c index 2b596341eb0..6618d9fba12 100644 --- a/sdk/lib/rtl/amd64/unwind.c +++ b/sdk/lib/rtl/amd64/unwind.c @@ -693,7 +693,7 @@ RtlpUnwindInternal( UnwindContext = *ContextRecord; /* Set up the constant fields of the dispatcher context */ - DispatcherContext.ContextRecord = ContextRecord; + DispatcherContext.ContextRecord = &UnwindContext; DispatcherContext.HistoryTable = HistoryTable; DispatcherContext.TargetIp = (ULONG64)TargetIp; @@ -778,7 +778,7 @@ RtlpUnwindInternal( /* Call the language specific handler */ Disposition = ExceptionRoutine(ExceptionRecord, (PVOID)EstablisherFrame, - &UnwindContext, + ContextRecord, &DispatcherContext); /* Clear exception flags for the next iteration */ @@ -991,7 +991,7 @@ RtlWalkFrameChain(OUT PVOID *Callers, } /* Check, if we have left our stack */ - if ((Context.Rsp < StackLow) || (Context.Rsp > StackHigh)) + if ((Context.Rsp <= StackLow) || (Context.Rsp >= StackHigh)) { break; }