From fe60d7de54b0c2f49e3090431dca238cb848d962 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Mon, 23 Jan 2023 12:23:27 +0100 Subject: [PATCH] don't create temporary struct at time of push_back as it may be deleted prematurely (seen only on freebsd with llvm devel, maybe that's the issue, or libcpp is ..) --- teshsuite/s4u/comm-fault-scenarios/comm-fault-scenarios.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teshsuite/s4u/comm-fault-scenarios/comm-fault-scenarios.cpp b/teshsuite/s4u/comm-fault-scenarios/comm-fault-scenarios.cpp index 4066f4a86d..fb881c8c0b 100644 --- a/teshsuite/s4u/comm-fault-scenarios/comm-fault-scenarios.cpp +++ b/teshsuite/s4u/comm-fault-scenarios/comm-fault-scenarios.cpp @@ -457,7 +457,8 @@ static void prepareScenario(ScenarioContext& ctx, CommType type, double duration DIE_IMPOSSIBLE; } } - ctx.scenarios.push_back({type, ctx.start_time, duration, sender_expected, receiver_expected, steps, ctx.index}); + Scenario scen{type, ctx.start_time, duration, sender_expected, receiver_expected, steps, ctx.index}; + ctx.scenarios.push_back(scen); ctx.active++; } ctx.index++; -- 2.20.1