From: Julian Seward Date: Tue, 17 Oct 2006 20:39:11 +0000 (+0000) Subject: Ensure VG_(tt_fastN) always stays as an array of NULLs if BB profiling X-Git-Tag: svn/VALGRIND_3_3_0~566 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd33fb450de92cf3463ed8dd8236ab76f3943df;p=thirdparty%2Fvalgrind.git Ensure VG_(tt_fastN) always stays as an array of NULLs if BB profiling isn't in effect. This should cause the dispatcher to segfault if it should ever inadvertantly end up running the profiled dispatch loop when it shouldn't. [The alternative is to run slowly for no apparent reason.] git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6310 --- diff --git a/coregrind/m_transtab.c b/coregrind/m_transtab.c index 8f115a7fa6..551aa2350f 100644 --- a/coregrind/m_transtab.c +++ b/coregrind/m_transtab.c @@ -613,7 +613,7 @@ static void setFastCacheEntry ( Addr64 key, ULong* tce, UInt* count ) { UInt cno = (UInt)VG_TT_FAST_HASH(key); VG_(tt_fast)[cno] = tce; - VG_(tt_fastN)[cno] = count; + VG_(tt_fastN)[cno] = VG_(clo_profile_flags) > 0 ? count : NULL; n_fast_updates++; }