Skip to content

Conversation

@akarnokd
Copy link
Collaborator

If a source to the Zip operator completes immediately before the SubscribeSafe returned, the associated entry in _subscriptions would be still null, thus the Dispose() call fails with a NullReferenceException.

The fix checks if the _subscriptions is still valid and uses the deferred dispose approach to clean up the indexed entry.

@danielcweber
Copy link
Collaborator

Early termination aside, the fact that we wouldn't handle the disposal with TryDispose at that specific location was a bug in its own right, wasn't it?

@danielcweber danielcweber merged commit 1c4a708 into dotnet:master Aug 22, 2018
@akarnokd
Copy link
Collaborator Author

Yes, a concurrent completion would have potentially experience that null slot too.

@akarnokd akarnokd deleted the ZipNull branch August 22, 2018 10:36
@danielcweber danielcweber mentioned this pull request Oct 1, 2018
danielcweber added a commit that referenced this pull request Oct 1, 2018
Prepare bugfix release 4.1.1. Contains #806, #807, #809, #816.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants