projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2370e6
)
Avoid seg fault in the case where ensureModel is called in cds_func_entry and then...
author
weiyu
<weiyuluo1232@gmail.com>
Sun, 10 Nov 2019 21:55:25 +0000
(13:55 -0800)
committer
weiyu
<weiyuluo1232@gmail.com>
Sun, 10 Nov 2019 21:55:25 +0000
(13:55 -0800)
datarace.cc
patch
|
blob
|
history
diff --git
a/datarace.cc
b/datarace.cc
index 58c52dd63c7a80baf27f3017cc4c195054a8f524..dd88c2fe98f095d678e55c3dbf1162d98298b9d7 100644
(file)
--- a/
datarace.cc
+++ b/
datarace.cc
@@
-256,6
+256,9
@@
void raceCheckWrite(thread_id_t thread, void *location)
uint64_t *shadow = lookupAddressEntry(location);
uint64_t shadowval = *shadow;
ClockVector *currClock = get_execution()->get_cv(thread);
uint64_t *shadow = lookupAddressEntry(location);
uint64_t shadowval = *shadow;
ClockVector *currClock = get_execution()->get_cv(thread);
+ if (currClock == NULL)
+ return;
+
struct DataRace * race = NULL;
/* Do full record */
if (shadowval != 0 && !ISSHORTRECORD(shadowval)) {
struct DataRace * race = NULL;
/* Do full record */
if (shadowval != 0 && !ISSHORTRECORD(shadowval)) {
@@
-424,6
+427,9
@@
void raceCheckRead(thread_id_t thread, const void *location)
uint64_t *shadow = lookupAddressEntry(location);
uint64_t shadowval = *shadow;
ClockVector *currClock = get_execution()->get_cv(thread);
uint64_t *shadow = lookupAddressEntry(location);
uint64_t shadowval = *shadow;
ClockVector *currClock = get_execution()->get_cv(thread);
+ if (currClock == NULL)
+ return;
+
struct DataRace * race = NULL;
/* Do full record */
struct DataRace * race = NULL;
/* Do full record */