From c99f2a983be16a2c2c734ab4a9ab7f309026036d Mon Sep 17 00:00:00 2001 From: Brian Demsky Date: Tue, 7 Jan 2020 11:52:36 -0800 Subject: [PATCH] Bug fix --- action.cc | 2 +- execution.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()); -- 2.34.1