bug
authorBrian Demsky <bdemsky@uci.edu>
Thu, 1 Nov 2012 22:57:49 +0000 (15:57 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Thu, 1 Nov 2012 22:57:49 +0000 (15:57 -0700)
clockvector.cc

index 740b5cf2793de217eea47342e5a785537d016362..3363f7f4622bdd3de10baffc7c058692cbb8ac95 100644 (file)
@@ -42,8 +42,10 @@ void ClockVector::merge(const ClockVector *cv)
 {
        ASSERT(cv != NULL);
 
-       if (cv->num_threads > num_threads)
+       if (cv->num_threads > num_threads) {
                clock = (modelclock_t *)snapshot_realloc(clock, cv->num_threads * sizeof(modelclock_t));
+               num_threads = cv->num_threads;
+       }
 
        /* Element-wise maximum */
        for (int i = 0; i < cv->num_threads; i++)