From dcd780cf563a7051326b021d102597ce97bb49fc Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Mon, 6 Mar 2023 16:07:47 +0100 Subject: [PATCH] Disable test to not trigger -Werror=use-after-free (#877) Co-authored-by: Ovidiu Voda --- test/actor/actor_ref.test.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/actor/actor_ref.test.cpp b/test/actor/actor_ref.test.cpp index 0f07b87a8..66ed72377 100644 --- a/test/actor/actor_ref.test.cpp +++ b/test/actor/actor_ref.test.cpp @@ -99,6 +99,13 @@ TEST(ActorRef, AskOnDestroyedActor) { actor.reset(); EXPECT_TRUE(died); - auto result = ref.ask(&TestActorRef::receive); - EXPECT_ANY_THROW(result.get()); + // the code below does not compile with newer versions of gcc due to + // (correctly) identifying a -Werror=use-after-free situation + // the problem is that the ActorRef has a pointer to the actor + // whose memory is managed by AspiringActor, which has been destroyed + // mitigation would require getting rid of the raw pointer + // See https://github.com/maplibre/maplibre-gl-native/issues/876 + + // auto result = ref.ask(&TestActorRef::receive); + // EXPECT_ANY_THROW(result.get()); }