common: early quit on MODEL_ASSERT()
[c11tester.git] / common.cc
index 20102b0bba76ecee78f3491302b5768967c482a2..f4aa7ecefa023417c7eec4680e38e1c25a5cc13b 100644 (file)
--- 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);
        }
 }