From 5d18f434c0b1d3c80abdef0053b41bee17543cfbbe035eaedc482b3b3689356d Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 24 Jun 2016 23:56:01 +0000 Subject: [PATCH] Accepting request 403878 from KDE:Qt5 - Update to 5.6.1 * For more details please see: http://blog.qt.io/blog/2016/06/08/qt-5-6-1-released/ - Drop upstreamed Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch "Statement might be overflowing a buffer" post-build-check error OBS-URL: https://build.opensuse.org/request/show/403878 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdeclarative?expand=0&rev=32 --- ...-code-relating-to-null-this-pointers.patch | 37 ----------- libqt5-qtdeclarative.changes | 20 +++++- libqt5-qtdeclarative.spec | 10 +-- overflow.patch | 10 +-- ...pes_if_they_arent_referenced_anymore.patch | 62 +++++++++++++++++++ qtdeclarative-opensource-src-5.6.0.tar.xz | 3 - qtdeclarative-opensource-src-5.6.1.tar.xz | 3 + 7 files changed, 92 insertions(+), 53 deletions(-) delete mode 100644 Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch create mode 100644 qml_only_release_types_if_they_arent_referenced_anymore.patch delete mode 100644 qtdeclarative-opensource-src-5.6.0.tar.xz create mode 100644 qtdeclarative-opensource-src-5.6.1.tar.xz diff --git a/Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch b/Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch deleted file mode 100644 index 288fd80..0000000 --- a/Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 18e77550f149722e0554f24ddfa326e03a9fef10 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira -Date: Thu, 19 May 2016 15:56:10 -0700 -Subject: [PATCH] Workaround for crashes in QtQml code relating to null this - pointers - -When compiled in release mode with GCC 6, QtQml crashes. This option -gets works around the issue by instructing the compiler not to delete -null pointer checks for pointers that the standard says cannot be null, -yet apparently are. - -This is a temporary workaround until a proper solution is found. - -Change-Id: Id3aab65533904562a6cbfffd14501a185fc91179 -Reviewed-by: Lars Knoll ---- - src/qml/qml.pro | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/qml/qml.pro b/src/qml/qml.pro -index e30c39c..f4862a1 100644 ---- a/src/qml/qml.pro -+++ b/src/qml/qml.pro -@@ -16,6 +16,11 @@ exists("qqml_enable_gcov") { - LIBS_PRIVATE += -lgcov - } - -+greaterThan(QT_GCC_MAJOR_VERSION, 5) { -+ # Our code is bad. Temporary workaround. -+ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -+} -+ - QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf - - # 2415: variable "xx" of static storage duration was declared but never referenced --- -2.7.4 diff --git a/libqt5-qtdeclarative.changes b/libqt5-qtdeclarative.changes index a6eeec5..9263aa6 100644 --- a/libqt5-qtdeclarative.changes +++ b/libqt5-qtdeclarative.changes @@ -1,8 +1,22 @@ ------------------------------------------------------------------- -Tue Jun 21 09:53:21 UTC 2016 - lbeltrame@kde.org +Tue Jun 21 09:41:43 UTC 2016 - lbeltrame@kde.org - Add qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch - - Fix crashes with i686 and QML loader (boo#985768) + * Fix crash with i586 and QML loaders (boo#985768) + +------------------------------------------------------------------- +Thu Jun 16 15:39:26 UTC 2016 - hrvoje.senjan@gmail.com + +- Added qml_only_release_types_if_they_arent_referenced_anymore.patch + +------------------------------------------------------------------- +Wed Jun 8 14:15:15 UTC 2016 - hrvoje.senjan@gmail.com + +- Update to 5.6.1 + * For more details please see: + http://blog.qt.io/blog/2016/06/08/qt-5-6-1-released/ +- Drop upstreamed + Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch ------------------------------------------------------------------- Thu May 26 15:49:35 UTC 2016 - hrvoje.senjan@gmail.com @@ -21,7 +35,7 @@ Fri Mar 18 19:03:05 UTC 2016 - hrvoje.senjan@gmail.com Refactor-FxViewItem-releasing-code.patch and sanitize-visibleItems-list-after-model-insertions.patch - Add overflow.patch to resolve - "Statement might be overflowing a buffer" post-build-check error + "Statement might be overflowing a buffer" post-build-check error * For more details please see: http://blog.qt.io/blog/2016/03/16/qt-5-6-released/ and https://wiki.qt.io/New_Features_in_Qt_5.6 diff --git a/libqt5-qtdeclarative.spec b/libqt5-qtdeclarative.spec index 6df5151..f9d8dff 100644 --- a/libqt5-qtdeclarative.spec +++ b/libqt5-qtdeclarative.spec @@ -21,22 +21,22 @@ %define libname libQtQuick5 Name: libqt5-qtdeclarative -Version: 5.6.0 +Version: 5.6.1 Release: 0 Summary: Qt 5 Declarative Library License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0 Group: Development/Libraries/X11 Url: http://qt.digia.com %define base_name libqt5 -%define real_version 5.6.0 -%define so_version 5.6.0 +%define real_version 5.6.1 +%define so_version 5.6.1 %define tar_version qtdeclarative-opensource-src-%{real_version} Source: %{tar_version}.tar.xz Source1: baselibs.conf # PATCH-FIX-OPENSUSE overflow.patch -- Statement might be overflowing a buffer Patch0: overflow.patch -# PATCH-FIX-UPSTREAM Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch -Patch1: Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch +# PATCH-FIX-UPSTREAM qml_only_release_types_if_they_arent_referenced_anymore.patch +Patch1: qml_only_release_types_if_they_arent_referenced_anymore.patch # PATCH-FIX-OPENSUSE: qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch - fix crashes with i586 and Plasma (boo #985768) Patch2: qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch BuildRequires: fdupes diff --git a/overflow.patch b/overflow.patch index 2ef2556..91f1575 100644 --- a/overflow.patch +++ b/overflow.patch @@ -1,13 +1,13 @@ --- a/src/qml/jsruntime/qv4value_p.h.orig 2015-08-23 09:15:03.157582462 +0200 +++ b/src/qml/jsruntime/qv4value_p.h 2015-08-23 09:19:46.516039994 +0200 -@@ -103,8 +103,8 @@ struct Q_QML_PRIVATE_EXPORT Value - #endif - - #ifdef QV4_USE_64_BIT_VALUE_ENCODING +@@ -123,8 +123,8 @@ struct Q_QML_PRIVATE_EXPORT Value + Q_ALWAYS_INLINE Heap::Base *m() const { Q_UNREACHABLE(); return Q_NULLPTR; } + Q_ALWAYS_INLINE void setM(Heap::Base *b) { Q_UNUSED(b); Q_UNREACHABLE(); } + #elif defined(QV4_USE_64_BIT_VALUE_ENCODING) - Q_ALWAYS_INLINE Heap::Base *m() const { Heap::Base *b; memcpy(&b, &_val, 8); return b; } - Q_ALWAYS_INLINE void setM(Heap::Base *b) { memcpy(&_val, &b, 8); } + Q_ALWAYS_INLINE Heap::Base *m() const { Heap::Base *b; memcpy(&b, &_val, QT_POINTER_SIZE); return b; } + Q_ALWAYS_INLINE void setM(Heap::Base *b) { memcpy(&_val, &b, QT_POINTER_SIZE); } #else // !QV4_USE_64_BIT_VALUE_ENCODING - Q_ALWAYS_INLINE Heap::Base *m() const { Heap::Base *b; quint32 v = value(); memcpy(&b, &v, 4); return b; } + Q_ALWAYS_INLINE Heap::Base *m() const { Q_STATIC_ASSERT(sizeof(Heap::Base*) == sizeof(quint32)); Heap::Base *b; quint32 v = value(); memcpy(&b, &v, 4); return b; } Q_ALWAYS_INLINE void setM(Heap::Base *b) { quint32 v; memcpy(&v, &b, 4); setValue(v); } diff --git a/qml_only_release_types_if_they_arent_referenced_anymore.patch b/qml_only_release_types_if_they_arent_referenced_anymore.patch new file mode 100644 index 0000000..773b710 --- /dev/null +++ b/qml_only_release_types_if_they_arent_referenced_anymore.patch @@ -0,0 +1,62 @@ +From 9b1231ca3d21ade574a8a7cf3f0805a8b520bcd5 Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Wed, 8 Jun 2016 17:32:32 +0200 +Subject: [PATCH] QML: Only release types if they aren't referenced anymore + +Just checking for references on m_compiledData is not enough. The +actual component can also be referenced. Thus it won't be deleted +on release(), but cannot be found in the type cache anymore. + +Task-number: QTBUG-53761 +Change-Id: I8567af8e75a078598e4fed31e4717134e1332278 +Reviewed-by: Mitch Curtis +Reviewed-by: Simon Hausmann +(cherry picked from commit 2ac19881f92c94f4e9427bd9ff513210675f259e) +--- + src/qml/qml/qqmltypeloader.cpp | 3 ++- + tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp | 15 ++++++++++++--- + 2 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp +index c684c86..01200fd 100644 +--- a/src/qml/qml/qqmltypeloader.cpp ++++ b/src/qml/qml/qqmltypeloader.cpp +@@ -1961,7 +1961,8 @@ void QQmlTypeLoader::trimCache() + QList unneededTypes; + for (TypeCache::Iterator iter = m_typeCache.begin(), end = m_typeCache.end(); iter != end; ++iter) { + QQmlTypeData *typeData = iter.value(); +- if (typeData->m_compiledData && typeData->m_compiledData->count() == 1) { ++ if (typeData->m_compiledData && typeData->count() == 1 ++ && typeData->m_compiledData->count() == 1) { + // There are no live objects of this type + unneededTypes.append(iter); + } +diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp +index 7045c7c..a1eaa05 100644 +--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp ++++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp +@@ -86,10 +86,19 @@ void tst_QQMLTypeLoader::trimCache() + url.setQuery(QString::number(i)); + + QQmlTypeData *data = loader.getType(url); +- if (i % 5 == 0) // keep references to some of them so that they aren't trimmed +- data->compiledData()->addref(); ++ // Run an event loop to receive the callback that release()es. ++ QTRY_COMPARE(data->count(), 2); + +- data->release(); ++ // keep references to some of them so that they aren't trimmed. References to either the ++ // QQmlTypeData or its compiledData() should prevent the trimming. ++ if (i % 10 == 0) { ++ // keep ref on data, don't add ref on data->compiledData() ++ } else if (i % 5 == 0) { ++ data->compiledData()->addref(); ++ data->release(); ++ } else { ++ data->release(); ++ } + } + + for (int i = 0; i < 256; ++i) { +-- +2.1.4 diff --git a/qtdeclarative-opensource-src-5.6.0.tar.xz b/qtdeclarative-opensource-src-5.6.0.tar.xz deleted file mode 100644 index 5096b0c..0000000 --- a/qtdeclarative-opensource-src-5.6.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c55f053f0e348577b56da541af74d02d0f2b61c9a6c15152b03dad03dfde04c -size 18865300 diff --git a/qtdeclarative-opensource-src-5.6.1.tar.xz b/qtdeclarative-opensource-src-5.6.1.tar.xz new file mode 100644 index 0000000..73953b5 --- /dev/null +++ b/qtdeclarative-opensource-src-5.6.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12fcfd4bc4bad469f07f8c5404d98646f88f61200b014d4fbcb3a0d9e70942b4 +size 18803076