Bug fix
authorBrian Demsky <bdemsky@uci.edu>
Tue, 7 Jan 2020 19:52:36 +0000 (11:52 -0800)
committerBrian Demsky <bdemsky@uci.edu>
Tue, 7 Jan 2020 19:59:09 +0000 (11:59 -0800)
action.cc
execution.cc

index 16dcc5cde20afc4f5f3bf7a27d900fba52c5da0e..d65695446486e58a929196335660d8c3172cb94d 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -48,7 +48,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
        seq_number(ACTION_INITIAL_CLOCK)
 {
        /* References to NULL atomic variables can end up here */
        seq_number(ACTION_INITIAL_CLOCK)
 {
        /* References to NULL atomic variables can end up here */
-       ASSERT(loc || type == ATOMIC_FENCE);
+       ASSERT(loc || type == ATOMIC_FENCE || type == ATOMIC_NOP);
 
        Thread *t = thread ? thread : thread_current();
        this->tid = t!= NULL ? t->get_id() : -1;
 
        Thread *t = thread ? thread : thread_current();
        this->tid = t!= NULL ? t->get_id() : -1;
index f5ab21e2e9db74675eb99c643fa13b74137ea0b1..cd3ef4b01d93ff7daf1e4b29e0fc6e521f0f716c 100644 (file)
@@ -1725,7 +1725,7 @@ ClockVector * ModelExecution::computeMinimalCV() {
 /** Sometimes we need to remove an action that is the most recent in the thread.  This happens if it is mo before action in other threads.  In that case we need to create a replacement latest ModelAction */
 
 void ModelExecution::fixupLastAct(ModelAction *act) {
 /** Sometimes we need to remove an action that is the most recent in the thread.  This happens if it is mo before action in other threads.  In that case we need to create a replacement latest ModelAction */
 
 void ModelExecution::fixupLastAct(ModelAction *act) {
-       ModelAction *newact = new ModelAction(ATOMIC_NOP, std::memory_order_seq_cst, get_thread(act->get_tid()));
+       ModelAction *newact = new ModelAction(ATOMIC_NOP, std::memory_order_seq_cst, NULL, VALUE_NONE, get_thread(act->get_tid()));
        newact->set_seq_number(get_next_seq_num());
        newact->create_cv(act);
        newact->set_last_fence_release(act->get_last_fence_release());
        newact->set_seq_number(get_next_seq_num());
        newact->create_cv(act);
        newact->set_last_fence_release(act->get_last_fence_release());