-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix comparer in StringTokenMap #81341
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
|
Is there a way to test? |
|
I'm not sure how exactly did duplicate strings find its way to the map, I can try to figure it out to add an end-to-end test. I could also add just a unit test of the StringTokenMap. |
|
Unit test would do. End-to-end might be too fragile. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@dotnet/roslyn-compiler for reviews, thanks; this fixes a regression and will be backported |
Is my understanding correct that this issue is a regression caused by a PR that got merged violating merging policy for PRs touching code under Compilers? Specifically, the PR didn't get two sign-offs from the compiler team and the only sign-off from the compiler team wasn't from a senior developer? |
|
There was a sign off from Chuck (it's not displayed as green checkmark now but was at the time) and me, so that shouldn't be a violation.
I was not aware of this requirement. |
I guess not, for whatever reason Chuck's sign-off is grayed out in the GitHub UI. |
AlekseyTs
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.
LGTM (commit 2)
|
@dotnet/roslyn-compiler for a second review, thanks |
|
@dotnet/roslyn-compiler for a second review, this is soft-approved for .net servicing due next week, thanks |
Backport of #81341. QB workitem: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2643422 ### Customer Impact Customers are unable to build large projects which contain many string literals because the limit is being computed incorrectly. The [vsfeedback ticket](https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2641964) has collected 4 votes in 1 day. ### Regression - [x] Yes - from #78033; worked in VS 2022, broken in VS 2026 - [ ] No ### Testing Verified manually on user's repro. Also added a unit test. ### Risk Low. Simple change.
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2641964.
StringTokenMap (added in #78033; cc @tmat) used reference equality comparer; I believe by mistake; which made it possible for it to contain the same string multiple times; leading to overflowing the user string heap limit sooner than before.