From: Brian Demsky Date: Tue, 7 Jan 2020 19:52:36 +0000 (-0800) Subject: Bug fix X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c99f2a983be16a2c2c734ab4a9ab7f309026036d;p=c11tester.git Bug fix --- diff --git a/action.cc b/action.cc index 16dcc5cd..d6569544 100644 --- 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 */ - 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; diff --git a/execution.cc b/execution.cc index f5ab21e2..cd3ef4b0 100644 --- a/execution.cc +++ b/execution.cc @@ -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) { - 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());