From: Brian Norris Date: Thu, 3 May 2012 18:15:47 +0000 (-0700) Subject: replace non-fatal error messages with ASSERT()'s X-Git-Tag: pldi2013~465 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa162e6bfce69729bae70bae1f8009262f6e9bbf;p=model-checker.git 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. --- 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)