-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Properly null-terminate output buffer in basic_istream::get[line]
#5073
Properly null-terminate output buffer in basic_istream::get[line]
#5073
Conversation
@microsoft-github-policy-service agree |
Thanks, this is fantastic - and incredible for a first PR! 😻 I've pushed several minor nitpicks, a product code simplification, and a test code improvement. I appreciate the extremely detailed test coverage. We merge PRs simultaneously to our GitHub and MSVC-internal repos, mirrored in a semi-manual process and batched up to save time. Your PR will be part of the next batch, very likely this week. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks again, and congratulations on your first microsoft/STL commit! 🚀 😸 🥳 This change is expected to ship in VS 2022 17.13 Preview 3. |
Fixes #5070.
The libcxx tests istream.unformatted/get_pointer_size.pass.cpp and get_pointer_size_chart.pass.cpp pass now.
Since this issue is mostly about correct null-termination in the presence of exceptions, I added the tests to GH_001858_iostream_exception. They should cover the relevant cases:
failbit
sentry
failure with and without exception onfailbit
streambuf
character extraction with and withoutbadbit
exception propagationeofbit