-
Notifications
You must be signed in to change notification settings - Fork 11
Add null checks to SequenceEqual in System.Memory #236
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
Conversation
jozkee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- dotnet/coreclr#21232 was addressing null refs for more than just SequenceEqual, I think those will need to be addressed too.
- Can you please also include tests?
…or SequenceEqual NullReference scenario
…Update dataset expectations for some null reference scenarios where applicable in this repo.
I see the rest is added. Only |
tarekgh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added little comments/questions. LGTM, otherwise.
Fixes @dotnet/runtime/issues/119901
Ports the null-checking logic for
SpanHelpers<T>.SequenceEqualfrom the core runtime implementation to the System.Memory package, ensuring correct handling of nullable reference types and preventingNullReferenceExceptionwhen comparing arrays with nulls.