|
From: <sv...@va...> - 2006-10-17 20:39:17
|
Author: sewardj
Date: 2006-10-17 21:39:11 +0100 (Tue, 17 Oct 2006)
New Revision: 6310
Log:
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.]
Modified:
trunk/coregrind/m_transtab.c
Modified: trunk/coregrind/m_transtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_transtab.c 2006-10-17 13:58:17 UTC (rev 6309)
+++ trunk/coregrind/m_transtab.c 2006-10-17 20:39:11 UTC (rev 6310)
@@ -613,7 +613,7 @@
{
UInt cno =3D (UInt)VG_TT_FAST_HASH(key);
VG_(tt_fast)[cno] =3D tce;
- VG_(tt_fastN)[cno] =3D count;
+ VG_(tt_fastN)[cno] =3D VG_(clo_profile_flags) > 0 ? count : NULL;
n_fast_updates++;
}
=20
|