From 72884f9c682441d0a9de0f2df63b47cde7822058 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 2 Oct 2021 14:03:03 +0200 Subject: [PATCH] Misc. cosmetic changes. --- .github/workflows/ci-bigdft.yml | 2 +- src/kernel/activity/ExecImpl.hpp | 1 + src/kernel/actor/ActorImpl.cpp | 2 +- src/simgrid/Exception.cpp | 4 ++-- src/xbt/exception.cpp | 5 ++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-bigdft.yml b/.github/workflows/ci-bigdft.yml index c5d86b58f6..ef8a6a7965 100644 --- a/.github/workflows/ci-bigdft.yml +++ b/.github/workflows/ci-bigdft.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest - container: + container: image: bigdft/sdk options: --user 0 diff --git a/src/kernel/activity/ExecImpl.hpp b/src/kernel/activity/ExecImpl.hpp index e02c10f2d3..f52e203ca8 100644 --- a/src/kernel/activity/ExecImpl.hpp +++ b/src/kernel/activity/ExecImpl.hpp @@ -28,6 +28,7 @@ class XBT_PUBLIC ExecImpl : public ActivityImpl_T { std::vector bytes_amounts_; s4u::Exec* piface_; int cb_id_ = -1; // callback id from Host::on_state_change.connect() + public: ExecImpl(); s4u::Exec* get_iface() { return piface_; } diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index 33c107a081..801eb53524 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -519,7 +519,7 @@ void create_maestro(const std::function& code) } // namespace simgrid /* needs to be public and without simcall because it is called by exceptions and logging events */ -const char* SIMIX_process_self_get_name() // XBT_ATTRIB_DEPRECATD_v333 +const char* SIMIX_process_self_get_name() // XBT_ATTRIB_DEPRECATED_v333 { return SIMIX_is_maestro() ? "maestro" : simgrid::kernel::actor::ActorImpl::self()->get_cname(); } diff --git a/src/simgrid/Exception.cpp b/src/simgrid/Exception.cpp index d9c9e8ef82..d250e733c0 100644 --- a/src/simgrid/Exception.cpp +++ b/src/simgrid/Exception.cpp @@ -35,8 +35,8 @@ bool ForcefulKillException::try_n_catch(const std::function& try_block) try { try_block(); res = true; - } catch (ForcefulKillException const&) { - XBT_DEBUG("Caught a ForcefulKillException"); + } catch (ForcefulKillException const& e) { + XBT_DEBUG("Caught a ForcefulKillException: %s", e.what()); res = false; } return res; diff --git a/src/xbt/exception.cpp b/src/xbt/exception.cpp index 8c4ac9669d..9fadba9467 100644 --- a/src/xbt/exception.cpp +++ b/src/xbt/exception.cpp @@ -88,8 +88,7 @@ XBT_ATTRIB_NORETURN static void handler() std::abort(); } - // Get the current backtrace and exception - simgrid::xbt::Backtrace bt = simgrid::xbt::Backtrace(); + // Get the current exception and show backtrace try { std::rethrow_exception(std::current_exception()); } @@ -120,7 +119,7 @@ XBT_ATTRIB_NORETURN static void handler() } XBT_ERROR("Unknown uncaught exception"); } - show_backtrace(bt); + show_backtrace(simgrid::xbt::Backtrace()); std::abort(); } -- 2.20.1