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

unexpected behaviour of QWaitCondition::wait in 64bit version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Duplicate
    • Affects Version/s: 5.6.0
    • Fix Version/s: 5.12.0
    • Component/s: Core: Threads
    • Labels:
      None
    • Environment:
      Ubuntu 16.04 64Bit with Qt 5.6 64Bit
    • Commits:
      fd207c06b81b12086bdf80e4fa7b393bf1f424d6

      Description

      QWaitCondition::wait has a unsigned long parameter for the timeout. The documentation said, that the thread will waitfor the condition at least this time (in milliseconds). But if you call this method with a value greater than INT32_MAX on a 64Bit machine (where unsigned long is 64 bits) the function will not wait the expected time. If you call it with INT32_MAX for example, the function will return immediately (with false).

      The timeout parameter is internally converted into an int (which is 32 bit on a 64 machine). This results in a timeout of -1ms.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              thiago Thiago Macieira
              Reporter:
              rsprengel Rainer Sprengel
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes