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
This commit is contained in:
parent
8ac9392911
commit
5d18f434c0
@ -1,37 +0,0 @@
|
|||||||
From 18e77550f149722e0554f24ddfa326e03a9fef10 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
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 <lars.knoll@theqtcompany.com>
|
|
||||||
---
|
|
||||||
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
|
|
@ -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
|
- 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
|
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
|
Refactor-FxViewItem-releasing-code.patch and
|
||||||
sanitize-visibleItems-list-after-model-insertions.patch
|
sanitize-visibleItems-list-after-model-insertions.patch
|
||||||
- Add overflow.patch to resolve
|
- 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:
|
* For more details please see:
|
||||||
http://blog.qt.io/blog/2016/03/16/qt-5-6-released/
|
http://blog.qt.io/blog/2016/03/16/qt-5-6-released/
|
||||||
and https://wiki.qt.io/New_Features_in_Qt_5.6
|
and https://wiki.qt.io/New_Features_in_Qt_5.6
|
||||||
|
@ -21,22 +21,22 @@
|
|||||||
%define libname libQtQuick5
|
%define libname libQtQuick5
|
||||||
|
|
||||||
Name: libqt5-qtdeclarative
|
Name: libqt5-qtdeclarative
|
||||||
Version: 5.6.0
|
Version: 5.6.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Qt 5 Declarative Library
|
Summary: Qt 5 Declarative Library
|
||||||
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
|
License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
|
||||||
Group: Development/Libraries/X11
|
Group: Development/Libraries/X11
|
||||||
Url: http://qt.digia.com
|
Url: http://qt.digia.com
|
||||||
%define base_name libqt5
|
%define base_name libqt5
|
||||||
%define real_version 5.6.0
|
%define real_version 5.6.1
|
||||||
%define so_version 5.6.0
|
%define so_version 5.6.1
|
||||||
%define tar_version qtdeclarative-opensource-src-%{real_version}
|
%define tar_version qtdeclarative-opensource-src-%{real_version}
|
||||||
Source: %{tar_version}.tar.xz
|
Source: %{tar_version}.tar.xz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
# PATCH-FIX-OPENSUSE overflow.patch -- Statement might be overflowing a buffer
|
# PATCH-FIX-OPENSUSE overflow.patch -- Statement might be overflowing a buffer
|
||||||
Patch0: overflow.patch
|
Patch0: overflow.patch
|
||||||
# PATCH-FIX-UPSTREAM 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: Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.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)
|
# 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
|
Patch2: qtdeclarative-opensource-src-5.6.0-qml_no-lifetime-dse.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
--- a/src/qml/jsruntime/qv4value_p.h.orig 2015-08-23 09:15:03.157582462 +0200
|
--- 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
|
+++ 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
|
@@ -123,8 +123,8 @@ struct Q_QML_PRIVATE_EXPORT Value
|
||||||
#endif
|
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(); }
|
||||||
#ifdef QV4_USE_64_BIT_VALUE_ENCODING
|
#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 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 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 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); }
|
+ Q_ALWAYS_INLINE void setM(Heap::Base *b) { memcpy(&_val, &b, QT_POINTER_SIZE); }
|
||||||
#else // !QV4_USE_64_BIT_VALUE_ENCODING
|
#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); }
|
Q_ALWAYS_INLINE void setM(Heap::Base *b) { quint32 v; memcpy(&v, &b, 4); setValue(v); }
|
||||||
|
@ -0,0 +1,62 @@
|
|||||||
|
From 9b1231ca3d21ade574a8a7cf3f0805a8b520bcd5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ulf Hermann <ulf.hermann@qt.io>
|
||||||
|
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 <mitch.curtis@qt.io>
|
||||||
|
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
||||||
|
(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<TypeCache::Iterator> 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
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8c55f053f0e348577b56da541af74d02d0f2b61c9a6c15152b03dad03dfde04c
|
|
||||||
size 18865300
|
|
3
qtdeclarative-opensource-src-5.6.1.tar.xz
Normal file
3
qtdeclarative-opensource-src-5.6.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:12fcfd4bc4bad469f07f8c5404d98646f88f61200b014d4fbcb3a0d9e70942b4
|
||||||
|
size 18803076
|
Loading…
Reference in New Issue
Block a user