diff options
author | Byungseon Shin <sun.shin@lge.com> | 2013-04-16 17:54:27 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-06 12:21:30 +0200 |
commit | 49fe70cda9cda9d73080751cb97a7719d04db056 (patch) | |
tree | 1973d3acaa1672799d8c69f76fb189c55b57b88b | |
parent | 188ff8fb52527ac338c0223350067948d14eca60 (diff) | |
download | meta-qt5-49fe70cda9cda9d73080751cb97a7719d04db056.tar.gz |
qtbase: Fix reentrancy problem in image reading
* Fix GF-2779, by applying Upstream patch QTBUG-29281.
Signed-off-by: Byungseon Shin <sun.shin@lge.com>
Signed-off-by: Martin Jansa <martin.jansa@lge.com>
-rw-r--r-- | recipes-qt/qt5/qtbase/0005-AddSynchoronization-qimagereader.patch | 37 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase_5.0.0.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0005-AddSynchoronization-qimagereader.patch b/recipes-qt/qt5/qtbase/0005-AddSynchoronization-qimagereader.patch new file mode 100644 index 00000000..a16731a9 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0005-AddSynchoronization-qimagereader.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | commit e28c03cb829c229209090d7939a9aba1af1fdea9 | ||
2 | Author: aavit <eirik.aavitsland@digia.com> | ||
3 | Date: Tue Feb 19 18:11:16 2013 +0100 | ||
4 | |||
5 | Fix reentrancy problem in image reading | ||
6 | |||
7 | There were race conditions when accessing the plugin factory and | ||
8 | the image reader plugins from different threads; ref QTBUG-29281. | ||
9 | Added a mutex lock to avoid. | ||
10 | |||
11 | Change-Id: Ic1a3b6cbaf5603f1bcf7025b58247a9a3f6d08a9 | ||
12 | Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> | ||
13 | |||
14 | Upstream-Status: Backport (from 5.1.0) | ||
15 | |||
16 | diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp | ||
17 | index 5eaf7bb..6847786 100644 | ||
18 | --- a/src/gui/image/qimagereader.cpp | ||
19 | +++ b/src/gui/image/qimagereader.cpp | ||
20 | @@ -133,6 +133,7 @@ | ||
21 | // factory loader | ||
22 | #include <qcoreapplication.h> | ||
23 | #include <private/qfactoryloader_p.h> | ||
24 | +#include <QMutexLocker> | ||
25 | |||
26 | // image handlers | ||
27 | #include <private/qbmphandler_p.h> | ||
28 | @@ -232,6 +233,9 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device, | ||
29 | QByteArray suffix; | ||
30 | |||
31 | #ifndef QT_NO_IMAGEFORMATPLUGIN | ||
32 | + static QMutex mutex; | ||
33 | + QMutexLocker locker(&mutex); | ||
34 | + | ||
35 | typedef QMultiMap<int, QString> PluginKeyMap; | ||
36 | |||
37 | // check if we have plugins that support the image format | ||
diff --git a/recipes-qt/qt5/qtbase_5.0.0.bb b/recipes-qt/qt5/qtbase_5.0.0.bb index 9a0d68bc..a2a819e7 100644 --- a/recipes-qt/qt5/qtbase_5.0.0.bb +++ b/recipes-qt/qt5/qtbase_5.0.0.bb | |||
@@ -4,6 +4,7 @@ require qt5-${PV}.inc | |||
4 | PR = "${INC_PR}.0" | 4 | PR = "${INC_PR}.0" |
5 | 5 | ||
6 | SRC_URI += "file://0004-Disable-mkv8snapshot.patch" | 6 | SRC_URI += "file://0004-Disable-mkv8snapshot.patch" |
7 | SRC_URI += "file://0005-AddSynchoronization-qimagereader.patch" | ||
7 | 8 | ||
8 | SRC_URI[md5sum] = "c29073bfc3cf6b39492a2481d982386e" | 9 | SRC_URI[md5sum] = "c29073bfc3cf6b39492a2481d982386e" |
9 | SRC_URI[sha256sum] = "89bcde09b24e8139f9d1d957dcb07c5aada83d578c84279f66813f348243d500" | 10 | SRC_URI[sha256sum] = "89bcde09b24e8139f9d1d957dcb07c5aada83d578c84279f66813f348243d500" |