summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByungseon Shin <sun.shin@lge.com>2013-04-16 17:54:27 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2013-05-06 12:21:30 +0200
commit49fe70cda9cda9d73080751cb97a7719d04db056 (patch)
tree1973d3acaa1672799d8c69f76fb189c55b57b88b
parent188ff8fb52527ac338c0223350067948d14eca60 (diff)
downloadmeta-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.patch37
-rw-r--r--recipes-qt/qt5/qtbase_5.0.0.bb1
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 @@
1commit e28c03cb829c229209090d7939a9aba1af1fdea9
2Author: aavit <eirik.aavitsland@digia.com>
3Date: 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
14Upstream-Status: Backport (from 5.1.0)
15
16diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
17index 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
4PR = "${INC_PR}.0" 4PR = "${INC_PR}.0"
5 5
6SRC_URI += "file://0004-Disable-mkv8snapshot.patch" 6SRC_URI += "file://0004-Disable-mkv8snapshot.patch"
7SRC_URI += "file://0005-AddSynchoronization-qimagereader.patch"
7 8
8SRC_URI[md5sum] = "c29073bfc3cf6b39492a2481d982386e" 9SRC_URI[md5sum] = "c29073bfc3cf6b39492a2481d982386e"
9SRC_URI[sha256sum] = "89bcde09b24e8139f9d1d957dcb07c5aada83d578c84279f66813f348243d500" 10SRC_URI[sha256sum] = "89bcde09b24e8139f9d1d957dcb07c5aada83d578c84279f66813f348243d500"