libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] Unwinding through 0-length frames


From: Kevin Modzelewski
Subject: [Libunwind-devel] Unwinding through 0-length frames
Date: Mon, 21 Apr 2014 19:54:33 -0700

Hello all, I'm running into an issue when using libunwind, where it seems to be unable to unwind through a function that contains no stack variables.  This is coming from JIT'd code (specifically, LLVM's MCJIT), and I haven't set up a _U_dyn_register hook yet, so libunwind is falling back on the call-frame, which is fine since so far I'm disabling frame-pointer elimination.  The problem is that I've apparently generated my first function that contains no stack variables, which means that rsp=rbp and libunwind judges it to be an invalid rbp value and stops the unwind.

Here's a very simple patch that changes the heuristic to allow zero-length frames:
https://github.com/dropbox/pyston/blob/1b2e676417b0f5f17526ece0ed840aa88c744145/libunwind_patches/0001-Change-the-RBP-validation-heuristic-to-allow-size-0-.patch

It fixes this particular problem for me, but I don't know if an rbp=rsp situation is more commonly an unwind failure.  I'm planning on adding a _U_dyn_register hook which I assume is the better fix, but I was curious if this behavior is intentional.

kmod

reply via email to

[Prev in Thread] Current Thread [Next in Thread]