From 6f6f190daf30039f9972c06db5bb8bc2c63a085d Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Tue, 4 Aug 2026 06:40:49 -0700 Subject: [PATCH] Fix use-after-move of ContextContainer in PointerEventsProcessorTest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: The whole `PointerEventsProcessorTest` suite has been aborting in its fixture constructor since the `modernize-use-designated-initializers` codemod moved the `ContextContainer` into `ComponentDescriptorParameters`. The `shared_ptr` is read twice more afterwards — once to construct the `UIManager` and once to construct the `ShadowTree` — so the move left both with a null container and the second read tripped the libstdc++ null-deref assert. Stop moving out of a `shared_ptr` that is still needed by later statements. Changelog: [Internal] Differential Revision: D114730311 --- .../renderer/uimanager/tests/PointerEventsProcessorTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp b/packages/react-native/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp index f868cf4d0f20..35f0a714de7a 100644 --- a/packages/react-native/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp @@ -44,7 +44,7 @@ class PointerEventsProcessorTest : public ::testing::Test { componentDescriptorProviderRegistry.createComponentDescriptorRegistry( ComponentDescriptorParameters{ .eventDispatcher = eventDispatcher, - .contextContainer = std::move(contextContainer), + .contextContainer = contextContainer, .flavor = nullptr}); componentDescriptorProviderRegistry.add(