]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix uninitialised epoch when recording execontext.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 29 Jul 2018 19:21:07 +0000 (21:21 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 29 Jul 2018 19:37:25 +0000 (21:37 +0200)
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

index 50ec9f4ee5ae6fe519854c69ff6df8969ab9d93f..c5c8599069903bb2dd890a22489f6477fa0a7ec3 100644 (file)
@@ -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? */