projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ef795ab
)
Bug fix
author
Brian Demsky
<bdemsky@uci.edu>
Thu, 26 Dec 2019 08:02:34 +0000
(
00:02
-0800)
committer
Brian Demsky
<bdemsky@uci.edu>
Thu, 26 Dec 2019 08:02:34 +0000
(
00:02
-0800)
execution.cc
patch
|
blob
|
history
diff --git
a/execution.cc
b/execution.cc
index 1c03a97a7fd84ebd94e62023dca558602e33d93e..504f7f52a6ee2c40c551f23d49c63d90bb6b485f 100644
(file)
--- a/
execution.cc
+++ b/
execution.cc
@@
-1773,7
+1773,17
@@
void ModelExecution::collectActions() {
ModelAction *act = it->getVal();
//Do iteration early since we may delete node...
it=it->getPrev();
ModelAction *act = it->getVal();
//Do iteration early since we may delete node...
it=it->getPrev();
+ bool islastact = false;
+ ModelAction *lastact = get_last_action(act->get_tid());
+ if (act == lastact) {
+ Thread * th = get_thread(act);
+ islastact = !th->is_complete();
+ }
+
if (act->is_read()) {
if (act->is_read()) {
+ if (islastact) {
+ act->set_read_from(NULL);
+ }
if (act->get_reads_from()->is_free()) {
removeAction(act);
delete act;
if (act->get_reads_from()->is_free()) {
removeAction(act);
delete act;
@@
-1788,6
+1798,10
@@
void ModelExecution::collectActions() {
act->set_last_fence_release(NULL);
}
}
act->set_last_fence_release(NULL);
}
}
+ }
+
+ if (islastact) {
+ continue;
} else if (act->is_free()) {
removeAction(act);
delete act;
} else if (act->is_free()) {
removeAction(act);
delete act;
@@
-1824,7
+1838,7
@@
void ModelExecution::collectActions() {
delete act;
}
} else if (act->is_create()) {
delete act;
}
} else if (act->is_create()) {
- if (act->get_thread_operand()->
get_state()==THREAD_COMPLETED
) {
+ if (act->get_thread_operand()->
is_complete()
) {
removeAction(act);
delete act;
}
removeAction(act);
delete act;
}