From: Josef Weidendorfer Date: Thu, 8 Jan 2015 14:15:18 +0000 (+0000) Subject: Callgrind: fix BB discarding X-Git-Tag: svn/VALGRIND_3_11_0~730 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc60e4c9c80100f205da626babd7af82d948a74d;p=thirdparty%2Fvalgrind.git Callgrind: fix BB discarding When the info struct for a BB is created, we use the first guest instruction address as key to insert the info into a hash table. We should do the same when discarding. This actually is not a real problem, as Callgrind obviously is used very rarely with redirections. But we should be consistent with cachegrind. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14856 --- diff --git a/callgrind/main.c b/callgrind/main.c index 5d10b40d4d..30a0cce17c 100644 --- a/callgrind/main.c +++ b/callgrind/main.c @@ -1377,9 +1377,11 @@ void clg_discard_superblock_info ( Addr orig_addr, VexGuestExtents vge ) (void*)orig_addr, (void*)vge.base[0], (ULong)vge.len[0]); - // Get BB info, remove from table, free BB info. Simple! Note that we - // use orig_addr, not the first instruction address in vge. - CLG_(delete_bb)(orig_addr); + // Get BB info, remove from table, free BB info. Simple! + // When created, the BB is keyed by the first instruction address, + // (not orig_addr, but eventually redirected address). Thus, we + // use the first instruction address in vge. + CLG_(delete_bb)(vge.base[0]); }