Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102157

QDateTime asserts on MSVC 2019 / C++20

    XMLWordPrintable

Details

    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Eddy Edward Welbourne
            peppe Giuseppe D'Angelo
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes