]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/explo/Exploration.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into 'master'
[simgrid.git] / src / mc / explo / Exploration.cpp
index 6be979ec56ac0de0194c565f453d9c0e850229ba..061a9b4473438ba304ec4822dfe0d90b91f34027 100644 (file)
@@ -66,13 +66,13 @@ void Exploration::log_state()
   }
 }
 
-void Exploration::report_crash(int status)
+XBT_ATTRIB_NORETURN void Exploration::report_crash(int status)
 {
   XBT_INFO("**************************");
   XBT_INFO("** CRASH IN THE PROGRAM **");
   XBT_INFO("**************************");
-  if (WIFSIGNALED(status))
-    XBT_INFO("From signal: %s", strsignal(WTERMSIG(status)));
+  if (WIFSIGNALED(status)) // FreeBSD use "Abort trap" as a strsignal for SIGABRT that is part of our tests
+    XBT_INFO("From signal: %s", WTERMSIG(status) == SIGABRT ? "Aborted" : strsignal(WTERMSIG(status)));
   else if (WIFEXITED(status))
     XBT_INFO("From exit: %i", WEXITSTATUS(status));
   if (not xbt_log_no_loc)
@@ -88,7 +88,7 @@ void Exploration::report_crash(int status)
   if (xbt_log_no_loc) {
     XBT_INFO("Stack trace not displayed because you passed --log=no_loc");
   } else {
-    auto* memory = get_remote_app().get_remote_process_memory();
+    const auto* memory = get_remote_app().get_remote_process_memory();
     if (memory) {
       XBT_INFO("Stack trace:");
       memory->dump_stack();
@@ -99,7 +99,7 @@ void Exploration::report_crash(int status)
 
   system_exit(SIMGRID_MC_EXIT_PROGRAM_CRASH);
 }
-void Exploration::report_assertion_failure()
+XBT_ATTRIB_NORETURN void Exploration::report_assertion_failure()
 {
   XBT_INFO("**************************");
   XBT_INFO("*** PROPERTY NOT VALID ***");
@@ -114,7 +114,7 @@ void Exploration::report_assertion_failure()
   system_exit(SIMGRID_MC_EXIT_SAFETY);
 }
 
-void Exploration::system_exit(int status)
+void Exploration::system_exit(int status) const
 {
   ::exit(status);
 }