From aa162e6bfce69729bae70bae1f8009262f6e9bbf Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 3 May 2012 11:15:47 -0700 Subject: [PATCH] replace non-fatal error messages with ASSERT()'s Some errors have been overlooked because they are not 'loud' enough. Use ASSERT() macro to fail-stop. --- model.cc | 4 ++-- threads.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model.cc b/model.cc index 6fea489..e0c16eb 100644 --- a/model.cc +++ b/model.cc @@ -108,8 +108,8 @@ thread_id_t ModelChecker::advance_backtracking_state() /* Else, we are trying to replay an execution */ exploring->advance_state(); - if (exploring->get_state() == NULL) - DEBUG("*** error: reached end of backtrack trace\n"); + + ASSERT(exploring->get_state() != NULL); return get_next_replay_thread(); } diff --git a/threads.cc b/threads.cc index e0cb277..bc553b1 100644 --- a/threads.cc +++ b/threads.cc @@ -116,7 +116,7 @@ static int thread_system_next(void) /* Stopped while running; i.e., completed */ curr->complete(); else - DEBUG("ERROR: current thread in unexpected state??\n"); + ASSERT(false); } next = model->scheduler->next_thread(); if (next) -- 2.34.1