DescriptionCertain functions may be missing unwind hints in the symbol files. In the general case, functions tend to push their caller's %rbp onto the stack immediately upon entry. As an exception, some functions may not push a stack frame with their caller's %rbp. This is problematic particularly on OS X where a number of common functions in libSystem.B.dylib (on 10.6.8 at least) have this exact behavior, such as mach_msg_trap. Encountering these functions in Breakpad dumps would cause the stackwalker to create a bogus backtrace. This patch, as proposed by Jim Blandy, check first to see if there is a plausible %rbp on the stack directly below the hypothetical return address. If not, we check to see if the previous frame's %rbp could apply to the next frame's. If it's still a valid %rbp (ie, %rbp > next %rsp), then we mark the next frame's %rbp as valid and set it equal to the previous frame's %rbp. I've updated the unit tests some and added a test specifically to exercise the %rbp-on-the-stack heuristic. Patch Set 1 #
Total comments: 4
MessagesTotal messages: 4
|