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

Revert change in AddInternedString #76496

Merged
merged 5 commits into from
Oct 2, 2022

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Oct 1, 2022

Fixes #76494

Restores old logic except this line that looks unused

EEStringData StringData = EEStringData((*pString)->GetStringLength(), (*pString)->GetBuffer());
(and adds an assert)

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for quick turnaround!

@EgorBo
Copy link
Member Author

EgorBo commented Oct 2, 2022

Thank you for quick turnaround!

Sorry for the problems that work causes 😞

The test I added seems to be too conservative as the official doc warns that string.Intern might return a new reference (and that happens on Mono judging by CI). In theory we indeed could copy non-interned string to FOH here but maybe some existing users depend on the behavior where string.Intern returns the same reference. Anyway I guess I need to remove the test

@jkotas jkotas merged commit 7d4b413 into dotnet:main Oct 2, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AV under coreclr!GlobalStringLiteralMap::AddStringLiteral
2 participants