ensure next stack frame address is valid when walking async stacks
Summary: We have cases where the C++ -> Lua calls are not properly following the calling convention and the pointer to the previous normal stack frame is not correctly pushed after the lua call. This results in segfaults when we try to walk the normal stack. Stack frame addresses for the normal stack frames should always be increasing. A simple fix is check whether the next stack frame address <= starting stack frame address. If it is, this indicates the end fo the stack (nullptr) or likely stack corruption, as in the case above. This means that we might miss out on the stack frames right before the stack frame that breaks the calling convention, but we should correctly get the rest of the async stack trace before this frame, and the stack frames after this frame. Reviewed By: yfeldblum Differential Revision: D30907903 fbshipit-source-id: 7d78b53570fd24dbb23b4fc49afa995d44c9e549
Showing
Please register or sign in to comment