Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
4.8.0, 5.0.0
-
None
-
32 bit x86 Linux Qt 4.8
Description
Line 119 is buggy:
http://qt.gitorious.org/qt/qt/blobs/4.8/src/corelib/thread/qmutex_unix.cpp
timeout is of type int, so in the most cases a qint32.
The calculation "qint64 xtimeout = timeout * 1000 * 1000;" will result in an overflow, it timeout is bigger then 2148.
The solution would be to cast timeout to a qint64 before multiplication.
Attachments
For Gerrit Dashboard: QTBUG-24795 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
23429,3 | Fix QMutex::tryLock timeout regression (integer overflow) | master | qt/qtbase | Status: MERGED | +2 | 0 |