From 4509adb85303afb471fbd10733f044535da5b1cc Mon Sep 17 00:00:00 2001 From: Kevin Modzelewski Date: Sun, 18 May 2014 19:32:28 -0700 Subject: [PATCH] x86_64: Handle edge conditions with zero length frames When JITs generate code without unwind information, it may be possible to continue unwinding via RBP chaining. However, we currently disallow RBP==RSP condition even though we can make forward progress. Relax the check a bit in the code where we switch from one type of unwinding to another to handle this situation. JIT authors are encouraged to use the dynamic unwind info registration API when the underlying platform supports it. Signed-off-by: Kevin Modzelewski --- src/x86_64/Gstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c index 9fa0967b..809d60b0 100644 --- a/src/x86_64/Gstep.c +++ b/src/x86_64/Gstep.c @@ -173,7 +173,7 @@ unw_step (unw_cursor_t *cursor) anything about new RBP (rbp1) since it may not be a frame pointer in the frame above. Just check we get the value. */ if (ret < 0 - || rbp <= c->dwarf.cfa + || rbp < c->dwarf.cfa || (rbp - c->dwarf.cfa) > 0x4000) { rip_loc = DWARF_NULL_LOC;