X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=datarace.cc;h=cfbe94bff3553761f81069c40ed63739db578e7a;hp=28ebcf6d744a903fa7c7d7510678405d6ad41252;hb=0636bb359706d39278eb31159aa612558784a22d;hpb=1e3cce83f208da50a267c163841f12d491aeec86 diff --git a/datarace.cc b/datarace.cc index 28ebcf6d..cfbe94bf 100644 --- a/datarace.cc +++ b/datarace.cc @@ -143,6 +143,8 @@ static void expandRecord(uint64_t *shadow) ASSERT(readThread >= 0); record->thread[0] = readThread; record->readClock[0] = readClock; + } else { + record->thread = NULL; } if (shadowval & ATOMICMASK) record->isAtomic = 1; @@ -541,7 +543,7 @@ struct DataRace * fullRaceCheckRead(thread_id_t thread, const void *location, ui } if (__builtin_popcount(copytoindex) <= 1) { - if (copytoindex == 0) { + if (copytoindex == 0 && record->thread == NULL) { int newCapacity = INITCAPACITY; record->thread = (thread_id_t *)snapshot_malloc(sizeof(thread_id_t) * newCapacity); record->readClock = (modelclock_t *)snapshot_malloc(sizeof(modelclock_t) * newCapacity);