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

QWaitCondition::wait returns immediately with false on Linux if the timeout greather than INT32_MAX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.7.0
    • Core: QtConcurrent
    • None

      The QWaitCondition::wait method has the parameter timeout, which is unsigned long.
      But on Linux a new method is introduced in QT 5.7:qt_abstime_for_timeout. This method is called by QWaitConditionPrivate::wait_relative (in line 132 in file qwaitcondition_unix.cpp).
      The problem is, that the timeout parameter of "qt_abstime_for_timeout" method is int, so the unsigned long timeout is converted implicitly to int at the calling, therefore all timeout values are greater INT32_MAX will be converted to zero.

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

            sorvig Morten Sørvig
            oraveczi Oravecz István
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes