Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.4
-
None
-
8
-
7db6aa4395 (qt/qtbase/dev) 7db6aa4395 (qt/tqtc-qtbase/dev) a723b7b996 (qt/qtbase/6.3) a723b7b996 (qt/tqtc-qtbase/6.3)
-
Team A Foundation Sprint 55
Description
Running tst_QDateTime on MSVC2019 64 bit (16.11.11) on C++20 hits this assert:
187: QFATAL : tst_QDateTime::setMSecsSinceEpoch(max) ASSERT: "!(status & QDateTimePrivate::ValidDateTime) || (offsetFromUtc >= -SECS_PER_DAY && offsetFromUtc <= SECS_PER_DAY)" in file ..\src\corelib\time\qdatetime.cpp, line 4178
187: FAIL! : tst_QDateTime::setMSecsSinceEpoch(max) Received a fatal error.
187: ..\src\corelib\time\qdatetime.cpp(4178) : failure location
- status contains ValidDateTime
- offsetFromUtc is 1511828489, which is actually an overflow – the code does (0 - msecs) / MSECS_PER_SEC where msecs is LONGLONG_MAX, and shoves it into a int.