Skip to content

Endless loop in CombinedEnumerator.MoveNext() #623

Description

@rhssiiy

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;
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions