Repository navigation
Conversation
Contributor
Author
|
@freak4pc this is the fix related to the |
Contributor
Author
|
BTW I did audit other types and didn't find a similar issue so this should be all. |
freak4pc
added a commit
to victorpimentel/RxSwift
that referenced
this pull request
Sep 4, 2026
* origin/main: Fix Observable values terminal race (ReactiveX#2728) Bump SPM watchOS deployment target to 5.0 (ReactiveX#2732) Bump faraday from 1.4.1 to 1.10.6 (ReactiveX#2720) Select Xcode 26.6 for CI on the macOS 26 runner image (ReactiveX#2726) Add regression test for the merge lock-inversion deadlock Run merge teardown outside forwardLock, keeping the disposed flag inside it Original fix of merge deadlock Add regression tests for the ReplaySubject, Connection and Zip lock-inversion deadlocks Apply review cleanups to Multicast and Zip Use performLocked and strip trailing whitespace Make ZipCollectionTypeSink not call out under lock Connect only outside of lock Make sure to never call dispose and subscribe underlock in Connection, ConnectionObservableAdapter and RefCountSink ReplayBufferBase propagate outiside locks Fix: missing CFBundleShortVersionString and update RX_VERSION *issue no ReactiveX#2687 (ReactiveX#2696) Fix concurrent share subscriptions (ReactiveX#2719) Bump addressable from 2.8.0 to 2.9.0 (ReactiveX#2702)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While following up on #2727, I found the same terminal/disposal race in
ObservableConvertibleType.values.onErrorandonCompletedwrite a capturedisFinishedflag whileonDisposedreads it, and those callbacks can run on different threads.AsyncThrowingStream.finishis idempotent, so this does not cause the double-resume crash from #2727, but the flag is still a data race and cancellation can win over the source terminal event.This replaces the flag with the existing
AtomicIntlatch. Each terminal callback claims the latch withfetchOr, and only the winner callsfinish. The test exercises 10,000 completion/cancellation races and waits for every task to finish.Tests:
xcodebuild -workspace Rx.xcworkspace -scheme AllTests-macOS -destination platform=macOS -only-testing:AllTests-macOS/ObservableConcurrencyTests test(the scheme enables Thread Sanitizer and Undefined Behavior Sanitizer).