From 67f8065b5df1b68b7b46af2c37cc0ba601fe5345 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 3 May 2012 23:51:26 -0700 Subject: [PATCH] model: change DEBUG() statement to ASSERT() Now that I've fixed the model-checking bug that produced this error, turn this error message into a fail-stop ASSERT() statement. This way, I won't ignore a bug like this in the future! --- model.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/model.cc b/model.cc index e323825..7678968 100644 --- a/model.cc +++ b/model.cc @@ -86,8 +86,9 @@ Thread * ModelChecker::schedule_next_thread() if (nextThread == THREAD_ID_T_NONE) return NULL; t = thread_map[id_to_int(nextThread)]; - if (t == NULL) - DEBUG("*** error: thread not in thread_map: id = %d\n", nextThread); + + ASSERT(t != NULL); + return t; } -- 2.34.1