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

Add diagnostics for sporadic failures in a <format> test #2494

Merged

Conversation

StephanTLavavej
Copy link
Member

The sporadic failure mentioned in #2449 has happened twice, in unrelated PRs, affecting both x86 and x64 (but curiously affecting clang-cl both times). We can't figure out why this is happening, so printing the return value of format() might help.

The output will look like this (with 2,000 zeroes, and there will be some difference between the strings):

Encountered sporadic failure GH-2449!
    str1: "1.34a1c000...000p+10"
expected: "1.34a1c000...000p+10"
DO NOT IGNORE/RERUN THIS FAILURE.
You must report it to the STL maintainers.
Assertion failed: false, file D:\GitHub\STL\tests\std\tests\P0645R10_text_formatting_formatting\test.cpp, line 829

@StephanTLavavej StephanTLavavej added test Related to test code format C++20/23 format labels Jan 20, 2022
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner January 20, 2022 05:06
cerr << " str1: \"" << str1 << "\"\n";
cerr << "expected: \"" << expected << "\"\n";
cerr << "DO NOT IGNORE/RERUN THIS FAILURE.\n";
cerr << "You must report it to the STL maintainers.\n";

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could, but I don't think it's necessary. charconv doesn't perform floating-point operations, especially the hexfloat codepath. The FPU's transistors are totally cold.

@StephanTLavavej StephanTLavavej self-assigned this Jan 21, 2022
@StephanTLavavej
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format C++20/23 format test Related to test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants