From: Augustin Degomme Date: Mon, 23 Jan 2023 11:23:27 +0000 (+0100) Subject: don't create temporary struct at time of push_back as it may be deleted prematurely... X-Git-Tag: v3.34~595 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fe60d7de54b0c2f49e3090431dca238cb848d962 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 ..) --- 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++;