projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e3cce8
)
fix memory leak
author
Brian Demsky
<bdemsky@uci.edu>
Thu, 28 May 2020 19:54:52 +0000
(12:54 -0700)
committer
Brian Demsky
<bdemsky@uci.edu>
Thu, 28 May 2020 19:54:52 +0000
(12:54 -0700)
datarace.cc
patch
|
blob
|
history
diff --git
a/datarace.cc
b/datarace.cc
index 28ebcf6d744a903fa7c7d7510678405d6ad41252..cfbe94bff3553761f81069c40ed63739db578e7a 100644
(file)
--- 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;
ASSERT(readThread >= 0);
record->thread[0] = readThread;
record->readClock[0] = readClock;
+ } else {
+ record->thread = NULL;
}
if (shadowval & ATOMICMASK)
record->isAtomic = 1;
}
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 (__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);
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);