From: Philippe Waroquiers Date: Sun, 29 Jul 2018 19:21:07 +0000 (+0200) Subject: Fix uninitialised epoch when recording execontext. X-Git-Tag: VALGRIND_3_14_0~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f772902b65f4f9d48324b3093c438c25feaa6675;p=thirdparty%2Fvalgrind.git Fix uninitialised epoch when recording execontext. A fresh execontext must have a DiEpoch_INVALID() but the epoch was left uninitialised. This was detected by self-hosting valgrind. --- diff --git a/coregrind/m_execontext.c b/coregrind/m_execontext.c index 50ec9f4ee5..c5c8599069 100644 --- a/coregrind/m_execontext.c +++ b/coregrind/m_execontext.c @@ -537,6 +537,7 @@ static ExeContext* record_ExeContext_wrk2 ( const Addr* ips, UInt n_ips ) new_ec->n_ips = n_ips; new_ec->chain = ec_htab[hash]; + new_ec->epoch = DiEpoch_INVALID(); ec_htab[hash] = new_ec; /* Resize the hash table, maybe? */