Skip to content

Silence 3 static analysis warnings - #3743

Merged
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
StephanTLavavej:more-analysis
May 31, 2023
Merged

Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
StephanTLavavej:more-analysis

Conversation

@StephanTLavavej

Copy link
Copy Markdown
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 Dmitry Kobets (@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

Copy link
Copy Markdown
Member Author

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

Comment thread stl/inc/xlocale Outdated
Co-authored-by: Casey Carter <Casey@Carter.net>
@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit c8d1efb into microsoft:main May 31, 2023
@StephanTLavavej
Stephan T. Lavavej (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