Skip to content

multiple fixes to avoid Windows x64 crashes#2139

Open
dmah42 wants to merge 4 commits intomainfrom
fix/windows-test-failure
Open

multiple fixes to avoid Windows x64 crashes#2139
dmah42 wants to merge 4 commits intomainfrom
fix/windows-test-failure

Conversation

@dmah42
Copy link
Member

@dmah42 dmah42 commented Feb 28, 2026

  • fix: cast size_t widths to int for variadic printer to avoid Windows x64 issues with bitwidth differences
  • extend minimum time as Windows can have a coarse timer (15ms)
  • vsnprintf can consume va_list so we need to copy it to avoid UB

@dmah42 dmah42 marked this pull request as draft February 28, 2026 15:13
@dmah42 dmah42 changed the title cast size_t widths to int for variadic printer to avoid Windows x64 crashes multiple fixes to avoid Windows x64 crashes Feb 28, 2026
@dmah42 dmah42 marked this pull request as ready for review February 28, 2026 15:25
@dmah42 dmah42 requested a review from LebedevRI February 28, 2026 15:25
Comment on lines 140 to 200
@@ -196,8 +196,8 @@ void ConsoleReporter::PrintRunData(const Run& result) {
}
}
if ((output_options_ & OO_Tabular) != 0) {
printer(Out, COLOR_DEFAULT, " %*s%s", cNameLen - strlen(unit), s.c_str(),
unit);
printer(Out, COLOR_DEFAULT, " %*s%s",
static_cast<int>(cNameLen - strlen(unit)), s.c_str(), unit);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not really sure why this would be needed.
Other changes make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants