From f772902b65f4f9d48324b3093c438c25feaa6675 Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sun, 29 Jul 2018 21:21:07 +0200 Subject: [PATCH] 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. --- coregrind/m_execontext.c | 1 + 1 file changed, 1 insertion(+) 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? */ -- 2.47.2