When unwinding the stack on x86/amd64 subtract one from the value of
ip before starting a new pass of the loop.

The reason for this is that (except for the first pass of the loop) the
value of ip is actually a return address, which is therefore after the
instruction that was executing at the time. This means that if there is
a boundary in the CFI information at that point we can wind up using the
wrong CFI data to do the next unwind if we do it based on the return
address.

This most commonly happens with a tail call where we wind up using the
data for the next function to do the unwind and getting hopelessly lost.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4996 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed