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

Silence 3 static analysis warnings #3743

Merged
merged 2 commits into from
May 31, 2023

Conversation

StephanTLavavej
Copy link
Member

Followup to #3734.

I've filed a tracking bug VSO-1828677 "False positive warning C26450 (arithmetic overflow) in charconv and memory_resource" for the static analysis team to investigate, and @dmitrykobets-msft has added fully reduced repros there. Our code is correct, so we need to silence this warning until the compiler is fixed.

For locale::_Ptr, attempting to initialize it will break the STL catastrophically. I'm permanently suppressing the warning, with an explanation of the squirrelly 🐿️ behavior involved. In theory, this is not ABI-sensitive since classic_locale is isolated to the locale0.cpp TU, but iostreams is extremely complicated and fragile and I am not eager to mess with this logic at this time unless absolutely forced to.

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label May 31, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner May 31, 2023 20:10
@StephanTLavavej
Copy link
Member Author

I have speculatively mirrored this to MSVC-PR-475347 to fast-track it.

stl/inc/xlocale Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej merged commit c8d1efb into microsoft:main May 31, 2023
@StephanTLavavej StephanTLavavej deleted the more-analysis branch May 31, 2023 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants