Skip to content

Endless loop in CombinedEnumerator.MoveNext() #623

@rhssiiy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions