Fix walkStack() for inlined callee frames
commitc2bb8012a2f385dd7a2b7e95d7852b7b64856d74
authorMax Wang <mwang@fb.com>
Wed, 16 Oct 2019 15:53:08 +0000 (16 08:53 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 16 Oct 2019 15:55:06 +0000 (16 08:55 -0700)
tree455ac9217c570d5c271dea80103e4d9486ad5ae9
parente8ada470ffeb1735dc4788ab9c795f9592ba1ff2
Fix walkStack() for inlined callee frames

Summary:
Inlined frame fixups produce a vmfp() corresponding to the outermost
caller, but a vmpc() corresponding (sometimes) to the leaf inlined
function.  This is incoherent and causes assertion failures when
backtracing.

Fortunately, `callOff` exists and remedies this situation.

We should probably fix this more broadly, but currently we never access
vmpc() in native helpers that aren't builtins, which doesn't have this
issue, so this is a band-aid in the meantime.

This diff also documents the IFrame and IStack structs.

Reviewed By: mofarrell

Differential Revision: D17795273

fbshipit-source-id: d5906968a8200dd9fc613b0bd590a33aefd1fa67
hphp/runtime/base/backtrace-inl.h
hphp/runtime/base/backtrace.cpp
hphp/runtime/base/backtrace.h