From 8714c78cf3335c3b9f922828e394f98cd0e69428 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Sat, 3 Nov 2012 17:50:26 -0700 Subject: [PATCH] common: early quit on MODEL_ASSERT() If a user program hits an assertion, we should quit before executing any further. i.e., don't even wait for the next atomic action, since the assertion might trigger more bugs that have unintended/unforseen consequences. --- common.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/common.cc b/common.cc index 20102b0b..f4aa7ece 100644 --- a/common.cc +++ b/common.cc @@ -49,5 +49,6 @@ void model_assert(bool expr, const char *file, int line) printf(" [BUG] Program has hit assertion in file %s at line %d\n", file, line); model->set_assert(); + model->switch_to_master(NULL); } } -- 2.34.1