APP-3014: prevent scheduler delegate use-after-free (#11632)

This commit is contained in:
Samuel Newman
2026-09-02 18:26:23 +03:00
committed by GitHub
parent 701d7c4659
commit 7d39aa3422
3 changed files with 559 additions and 522 deletions
+16
View File
@@ -1,5 +1,21 @@
# ***This second part of this patch is load bearing, do not remove.***
## Scheduler delegate invalidation - iOS use-after-free
Fixes Sentry issue APP-T28X: an `EXC_BAD_ACCESS` in
`Scheduler::uiManagerDidFinishTransaction` or
`Scheduler::uiManagerDidDispatchCommand` after a queued rendering update
outlives its captured raw `SchedulerDelegate` pointer.
React Native 0.86 contains the invalidation-token guard from
facebook/react-native#56680, but `enableSchedulerDelegateInvalidation` is false
for the stable release level used by Expo. Override only this flag in
`ReactNativeFeatureFlagsOverridesOSSStable` instead of opting the app into all
experimental React Native flags.
**TODO: Remove after upgrading to a React Native release that closes the
queued Scheduler delegate lifetime race by default.**
## UIManager.cpp Patch - Fabric focus navigation use-after-free
Fixes Sentry issue APP-T4H9: a SIGSEGV in