Module: wine Branch: master Commit: 7de1284b59f18257bebbaa63b9a5ca89291251ed URL: https://gitlab.winehq.org/wine/wine/-/commit/7de1284b59f18257bebbaa63b9a5ca8...
Author: Eric Pouech eric.pouech@gmail.com Date: Wed Feb 1 16:22:52 2023 +0100
dbghelp: Stop unwinding on potential 64bit frame for i386 cpu.
Transform potential error on 32 => 64 bit transition with end of stack (needed in new wow64 for dbghelp's stackwalk tests).
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/dbghelp/cpu_i386.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c index c45c45f434c..dcc576cf295 100644 --- a/dlls/dbghelp/cpu_i386.c +++ b/dlls/dbghelp/cpu_i386.c @@ -473,7 +473,14 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame, union ctx newctx = *context;
if (!fetch_next_frame32(csw, &newctx, frame->AddrPC.Offset - deltapc)) - goto done_err; + { + /* When running on wow64 setup, frame below can a 64 bit frame. + * As we don't expose 64bit frames for now, pretend it's the first frame. + */ + if (frame->AddrPC.Offset == 0) + goto done_err; + newctx.x86.Eip = 0; + } frame->AddrReturn.Mode = AddrModeFlat; frame->AddrReturn.Offset = newctx.x86.Eip;