Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless loop in CombinedEnumerator.MoveNext() #623

Open
rhssiiy opened this issue Apr 10, 2024 · 0 comments
Open

Endless loop in CombinedEnumerator.MoveNext() #623

rhssiiy opened this issue Apr 10, 2024 · 0 comments

Comments

@rhssiiy
Copy link

rhssiiy commented Apr 10, 2024

We have forever loop in DotNetty.Transport.Channels.Groups.CombinedEnumerator.MoveNext() because in .NET 8
an empty ReadOnlyCollection<T> returns a singleton empty enumerator (dotnet/runtime#76097).

So there could be two identical enumerators here:

readonly IEnumerator<T> e1;
readonly IEnumerator<T> e2;

Which leads to an endless loop here:

for (;;)
{
if (this.currentEnumerator.MoveNext())
{
return true;
}
if (this.currentEnumerator == this.e1)
{
this.currentEnumerator = this.e2;
}
else
{
return false;
}
}

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

No branches or pull requests

1 participant