Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/6.0] [iOS][Android] Fix crash in Exception.CaptureDispatchSt…
…ate (#71171) * [iOS][Android] Fix crash in Exception.CaptureDispatchState There is a crash in `Exception.CaptureDispatchState` when called from one thread at the same time another calls into `Exception.RestoreDispatchState`. The reason for the crash is due to the way we do not update `foreignExceptionFrames` in a thread-safe way. `foreignExceptionFrames` is used in both methods and can crash when the size changes before the array is copied. The fix is to lock when reading from and writing to `foreignExceptionFrames`. Fixes #70081 * Lock all of CaptureDispatchState * Marek's feedback * Remove unnecessary field Co-authored-by: Steve Pfister <[email protected]>
- Loading branch information