x86_64: Handle edge conditions with zero length frames
authorKevin Modzelewski <kmod@dropbox.com>
Mon, 19 May 2014 02:32:28 +0000 (19:32 -0700)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 01:38:43 +0000 (10:38 +0900)
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 <kmod@dropbox.com>
src/x86_64/Gstep.c

index 9fa0967..809d60b 100644 (file)
@@ -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;