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 740b5cf..3363f7f 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++)