From ddea30a10d1acaef02712575c6fa4856de72cd4c 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