X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=common.cc;h=8b5c99717137d1d3f6a95b423fb6c8bf6fc2b08f;hb=1798c510e77f37e3d79cba6a1fdad3b13ccc9674;hp=f4aa7ecefa023417c7eec4680e38e1c25a5cc13b;hpb=2d500fe42404f9a451051bd7fefef6b3e50db0a7;p=model-checker.git diff --git a/common.cc b/common.cc index f4aa7ec..8b5c997 100644 --- a/common.cc +++ b/common.cc @@ -46,9 +46,9 @@ void assert_hook(void) void model_assert(bool expr, const char *file, int line) { if (!expr) { - printf(" [BUG] Program has hit assertion in file %s at line %d\n", + char msg[100]; + sprintf(msg, "Program has hit assertion in file %s at line %d\n", file, line); - model->set_assert(); - model->switch_to_master(NULL); + model->assert_bug(msg, true); } }