]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix for bug 265771.
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Fri, 4 Mar 2011 10:53:12 +0000 (10:53 +0000)
committerJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Fri, 4 Mar 2011 10:53:12 +0000 (10:53 +0000)
For calls (structure jCC), Callgrind maintains for the source
both the BBCC (counter array for the source context of the call, which
includes the BB of the source call position), as well as a jump
number in the source BB to reconstruct the guest instruction address
of the call. In setup_bbcc, this jump number is stored in <passed>, and
used when creating a new jCC on a call.

The value of <passed> got out of sync when we simulate a real jump
between different functions as return/call pair: the call source was
reset for the popped jCC, but not <passed>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11579

callgrind/bbcc.c

index bab48585445c078db770e4b7dd68be5b030760b6..4b01b97b91ffc3dc5253300b1a25004d45f2aa1f 100644 (file)
@@ -693,6 +693,7 @@ void CLG_(setup_bbcc)(BB* bb)
                /* change source for delayed push */
                CLG_(current_state).bbcc = top_ce->jcc->from;
                sp = top_ce->sp;
+               passed = top_ce->jcc->jmp;
                CLG_(pop_call_stack)();
            }
            else {