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

System.Collections.Generic.List<T> Sort(Comparison<T> comparison) doesn't invalidate the enumerator #169

Open
BalintPogatsa opened this issue May 6, 2022 · 2 comments

Comments

@BalintPogatsa
Copy link

Incrementing the _version field is probably missing from one overload of the Sort method in List after calling Array.Sort

Array.Sort(_items, 0, _size, comparer);

@svick
Copy link

svick commented May 10, 2022

This repository is not the right place to report issues with .Net.

For .Net Core/.Net 5+, this has already been fixed in dotnet/coreclr#8944.

For .Net Framework, you could report this issue on Developer Community, but I'm not convinced it would be fixed, considering the status of .Net Framework.

@BalintPogatsa
Copy link
Author

Thank you for the info.
Somehow I didn't manage to find List.cs in dotnet/runtime (System.Private.CoreLib did not seem like a place for the old System.Collections.Generic... )

I think that .NET Framework 4.8 still has a lifecycle without an end date, so I also thought these kind of bugfixes would be backported. Probably not a priority for MS.

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

2 participants