question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

std::chrono::current_zone crashes on MSVC builds

See original GitHub issue

The simple program in https://godbolt.org/z/Gs35jzodK that compiles:

#include <chrono>

int main() {
  (void)std::chrono::current_zone();
}

crashes on MSVC builds with error : Program returned: 3221226505 (this is STATUS_STACK_BUFFER_OVERRUN)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
StephanTLavavejcommented, Apr 7, 2022

https://github.com/microsoft/STL/wiki/VS-2019-Changelog#vs-2019-1610

While the STL generally provides all features on all supported versions of Windows, leap seconds and time zones (which change over time) require OS support that was added to Windows 10. Specifically, updating the leap second database requires Windows 10 version 1809 or later, and time zones require icu.dll which is provided by Windows 10 version 1903/19H1 or later. This applies to both client and server OSes; note that Windows Server 2019 is based on Windows 10 version 1809.

If the VMs are using Windows Server 2019, that would explain this - it’s too old for time zones. Windows Server 2022 will work (that’s what the STL’s own test VMs use).

0reactions
timmy-mscommented, Jun 3, 2022

We are currently blocked by the version of Windows that Kubernetes supports. As soon as we can upgrade to Server 2022 we will. Until then there is nothing we can do here sadly. 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiler Crash with chrono and initializer lists
I'm seeing a compiler internal error when initializing arrays of structs that contain chrono::duration that is not the first element of the struct....
Read more >
msvc std::chrono::time_zone::get_info throws an exception ...
c++ - msvc std::chrono::time_zone::get_info throws an exception saying: The operation completed successfully - Stack Overflow. Stack Overflow ...
Read more >
HowardHinnant/date - Gitter
I noticed that this does not work correctly with the GCC compiler and the built-in 128-bits integer as its std::chrono implementation contains static...
Read more >
Using std::chrono | Andrzej's C++ blog : r/cpp - Reddit
If you can represent fractions, there is little reason to represent anything but seconds, so mixing units by accident becomes very unlikely. Of ......
Read more >
Finding build bottlenecks with C++ Build Insights
Copy the perf_msvcbuildinsights.dll file from your Visual Studio 2019's MSVC installation directory to your newly installed WPA directory. This ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found