From 49fe70cda9cda9d73080751cb97a7719d04db056 Mon Sep 17 00:00:00 2001 From: Byungseon Shin Date: Tue, 16 Apr 2013 17:54:27 -0700 Subject: qtbase: Fix reentrancy problem in image reading * Fix GF-2779, by applying Upstream patch QTBUG-29281. Signed-off-by: Byungseon Shin Signed-off-by: Martin Jansa --- .../0005-AddSynchoronization-qimagereader.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 recipes-qt/qt5/qtbase/0005-AddSynchoronization-qimagereader.patch (limited to 'recipes-qt/qt5/qtbase') 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 @@ +commit e28c03cb829c229209090d7939a9aba1af1fdea9 +Author: aavit +Date: Tue Feb 19 18:11:16 2013 +0100 + + Fix reentrancy problem in image reading + + There were race conditions when accessing the plugin factory and + the image reader plugins from different threads; ref QTBUG-29281. + Added a mutex lock to avoid. + + Change-Id: Ic1a3b6cbaf5603f1bcf7025b58247a9a3f6d08a9 + Reviewed-by: Samuel Rødal + +Upstream-Status: Backport (from 5.1.0) + +diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp +index 5eaf7bb..6847786 100644 +--- a/src/gui/image/qimagereader.cpp ++++ b/src/gui/image/qimagereader.cpp +@@ -133,6 +133,7 @@ + // factory loader + #include + #include ++#include + + // image handlers + #include +@@ -232,6 +233,9 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device, + QByteArray suffix; + + #ifndef QT_NO_IMAGEFORMATPLUGIN ++ static QMutex mutex; ++ QMutexLocker locker(&mutex); ++ + typedef QMultiMap PluginKeyMap; + + // check if we have plugins that support the image format -- cgit v1.2.3-54-g00ecf