From bca7b5319b5c412f540c53212dfd01b5b7992e21 Mon Sep 17 00:00:00 2001 From: Millian Poquet Date: Tue, 14 May 2019 11:43:25 +0200 Subject: [PATCH] [mc] do not ignore MC_ASSERT in replay mode --- src/mc/mc_client_api.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mc/mc_client_api.cpp b/src/mc/mc_client_api.cpp index 0aeee5b8a4..2bfe6b5d9f 100644 --- a/src/mc/mc_client_api.cpp +++ b/src/mc/mc_client_api.cpp @@ -12,6 +12,7 @@ #include "src/mc/mc_ignore.hpp" #include "src/mc/mc_private.hpp" #include "src/mc/mc_record.hpp" +#include "src/mc/mc_replay.hpp" #include "src/mc/remote/Client.hpp" #include "src/mc/remote/mc_protocol.h" @@ -29,8 +30,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client_api, mc, void MC_assert(int prop) { xbt_assert(mc_model_checker == nullptr); - if (MC_is_active() && not prop) - simgrid::mc::Client::get()->reportAssertionFailure(); + if (not prop) { + if (MC_is_active()) + simgrid::mc::Client::get()->reportAssertionFailure(); + if (MC_record_replay_is_active()) + xbt_die("MC assertion failed"); + } } void MC_cut() -- 2.20.1