xbt_assert(waitpid(pid, &status, WAITPID_CHECKED_FLAGS) == pid && WIFSTOPPED(status) && WSTOPSIG(status) == SIGSTOP,
"Could not wait model-checked process");
- setup_ignore();
-
errno = 0;
#ifdef __linux__
ptrace(PTRACE_SETOPTIONS, pid, nullptr, PTRACE_O_TRACEEXIT);
errno);
}
-static constexpr auto ignored_local_variables = {
- std::make_pair("e", "*"),
- std::make_pair("_log_ev", "*"),
-
- /* Ignore local variable about time used for tracing */
- std::make_pair("start_time", "*"),
-};
-
-void ModelChecker::setup_ignore()
-{
- const RemoteProcessMemory& process = this->get_remote_process_memory();
- for (auto const& [var, frame] : ignored_local_variables)
- process.ignore_local_variable(var, frame);
-
- /* Static variable used for tracing */
- process.ignore_global_variable("counter");
-}
-
bool ModelChecker::handle_message(const char* buffer, ssize_t size)
{
s_mc_message_t base_message;
return false;
case MessageType::ASSERTION_FAILED:
- XBT_INFO("**************************");
- XBT_INFO("*** PROPERTY NOT VALID ***");
- XBT_INFO("**************************");
- XBT_INFO("Counter-example execution trace:");
- for (auto const& s : get_exploration()->get_textual_trace())
- XBT_INFO(" %s", s.c_str());
- XBT_INFO("You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with "
- "--cfg=model-check/replay:'%s'",
- get_exploration()->get_record_trace().to_string().c_str());
- exploration_->log_state();
- exploration_->system_exit(SIMGRID_MC_EXIT_SAFETY);
+ exploration_->report_assertion_failure();
+ break;
default:
xbt_die("Unexpected message from model-checked application");