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

Run-Time Check Failure in QHash

    XMLWordPrintable

Details

    • d7b34583926e3bd751120a4b827cd5ba6667dea3

    Description

      If you build a QHash on quint64 keys, e.g. QHash<quint64, QString> and use the
      debug version of Qt, you'll run into a Run-Time Check Failure:

      "Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of
      data. If this was intentional, you should mask the source of the cast with the
      appropriate bitmask. For example:

      char c = (i & 0xFF);

      Changing the code in this way will not affect the quality of the resulting
      optimized code."

      This happens in the function 'uint qHash(quint64 key)' in qhash.h.

      To reproduce the error, simply compile the enclosed C++ file using the
      command line "cl -Zi -RTCcsu test.cpp"

      Attachments

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

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            mpejcoch Martin Pejcoch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes