Accepting request 435736 from KDE:Qt5
- Add fix-crash-on-exit-when-using-default-property-aliases-with-layouts.patch: fix Plasma screenlocker crash on unlock (boo#999548, QTBUG#51927) - masm-unaligned-stack-pointer.patch: align stack on 16 byte boundaries in the YarrJIT (bsc#1003880) OBS-URL: https://build.opensuse.org/request/show/435736 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdeclarative?expand=0&rev=35
This commit is contained in:
parent
23b3dad336
commit
06e0d9f46f
@ -0,0 +1,186 @@
|
||||
From 5149aa68eca6ede8836ec4f07a14d22d9da9b161 Mon Sep 17 00:00:00 2001
|
||||
From: Mitch Curtis <mitch.curtis@qt.io>
|
||||
Date: Tue, 13 Sep 2016 12:42:12 +0200
|
||||
Subject: [PATCH 1/1] Fix crash on exit when using default property aliases
|
||||
with layouts
|
||||
|
||||
The layout was being destroyed before the text, which meant that the
|
||||
removeItemChangeListener() call never got hit. To ensure that the
|
||||
listener is always removed, loop through each child in QQuickLayout's
|
||||
destructor.
|
||||
|
||||
This is a manual cherry-pick of
|
||||
59c6c0e0b1b5b46747595a58e11311b7393d7e70.
|
||||
|
||||
Task-number: QTBUG-51927
|
||||
Change-Id: I669f42beb8c3dd6b4b741cae0b16e017bb3409df
|
||||
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
||||
---
|
||||
src/imports/layouts/qquicklayout.cpp | 4 ++
|
||||
.../qquicklayouts/data/rowlayout/Container.qml | 55 ++++++++++++++++++++++
|
||||
.../qquicklayouts/data/rowlayout/ContainerUser.qml | 53 +++++++++++++++++++++
|
||||
.../quick/qquicklayouts/data/tst_rowlayout.qml | 12 +++++
|
||||
4 files changed, 124 insertions(+)
|
||||
create mode 100644 tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
|
||||
create mode 100644 tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
|
||||
|
||||
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
|
||||
index abc8f97..9914826 100644
|
||||
--- a/src/imports/layouts/qquicklayout.cpp
|
||||
+++ b/src/imports/layouts/qquicklayout.cpp
|
||||
@@ -698,6 +698,10 @@ QQuickLayout::QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent)
|
||||
QQuickLayout::~QQuickLayout()
|
||||
{
|
||||
d_func()->m_isReady = false;
|
||||
+
|
||||
+ const auto childItems = d_func()->childItems;
|
||||
+ for (QQuickItem *child : childItems)
|
||||
+ QQuickItemPrivate::get(child)->removeItemChangeListener(this, QQuickItemPrivate::SiblingOrder);
|
||||
}
|
||||
|
||||
QQuickLayoutAttached *QQuickLayout::qmlAttachedProperties(QObject *object)
|
||||
diff --git a/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml b/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
|
||||
new file mode 100644
|
||||
index 0000000..22205c1
|
||||
--- /dev/null
|
||||
+++ b/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
|
||||
@@ -0,0 +1,55 @@
|
||||
+/****************************************************************************
|
||||
+**
|
||||
+** Copyright (C) 2016 The Qt Company Ltd.
|
||||
+** Contact: http://www.qt.io/licensing/
|
||||
+**
|
||||
+** This file is part of the test suite of the Qt Toolkit.
|
||||
+**
|
||||
+** $QT_BEGIN_LICENSE:BSD$
|
||||
+** You may use this file under the terms of the BSD license as follows:
|
||||
+**
|
||||
+** "Redistribution and use in source and binary forms, with or without
|
||||
+** modification, are permitted provided that the following conditions are
|
||||
+** met:
|
||||
+** * Redistributions of source code must retain the above copyright
|
||||
+** notice, this list of conditions and the following disclaimer.
|
||||
+** * Redistributions in binary form must reproduce the above copyright
|
||||
+** notice, this list of conditions and the following disclaimer in
|
||||
+** the documentation and/or other materials provided with the
|
||||
+** distribution.
|
||||
+** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
+** contributors may be used to endorse or promote products derived
|
||||
+** from this software without specific prior written permission.
|
||||
+**
|
||||
+**
|
||||
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
+**
|
||||
+** $QT_END_LICENSE$
|
||||
+**
|
||||
+****************************************************************************/
|
||||
+
|
||||
+import QtQuick 2.7
|
||||
+import QtQuick.Layouts 1.3
|
||||
+
|
||||
+Item {
|
||||
+ objectName: "qtbug51927-window"
|
||||
+ visible: true
|
||||
+
|
||||
+ default property alias _contents: customContent.data
|
||||
+
|
||||
+ RowLayout {
|
||||
+ id: customContent
|
||||
+ objectName: "qtbug51927-columnLayout"
|
||||
+ anchors.fill: parent
|
||||
+ }
|
||||
+}
|
||||
diff --git a/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml b/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
|
||||
new file mode 100644
|
||||
index 0000000..ff7ce62
|
||||
--- /dev/null
|
||||
+++ b/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
|
||||
@@ -0,0 +1,53 @@
|
||||
+/****************************************************************************
|
||||
+**
|
||||
+** Copyright (C) 2016 The Qt Company Ltd.
|
||||
+** Contact: http://www.qt.io/licensing/
|
||||
+**
|
||||
+** This file is part of the test suite of the Qt Toolkit.
|
||||
+**
|
||||
+** $QT_BEGIN_LICENSE:BSD$
|
||||
+** You may use this file under the terms of the BSD license as follows:
|
||||
+**
|
||||
+** "Redistribution and use in source and binary forms, with or without
|
||||
+** modification, are permitted provided that the following conditions are
|
||||
+** met:
|
||||
+** * Redistributions of source code must retain the above copyright
|
||||
+** notice, this list of conditions and the following disclaimer.
|
||||
+** * Redistributions in binary form must reproduce the above copyright
|
||||
+** notice, this list of conditions and the following disclaimer in
|
||||
+** the documentation and/or other materials provided with the
|
||||
+** distribution.
|
||||
+** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
+** contributors may be used to endorse or promote products derived
|
||||
+** from this software without specific prior written permission.
|
||||
+**
|
||||
+**
|
||||
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
+**
|
||||
+** $QT_END_LICENSE$
|
||||
+**
|
||||
+****************************************************************************/
|
||||
+
|
||||
+import QtQuick 2.6
|
||||
+import QtQuick.Window 2.2
|
||||
+
|
||||
+Container {
|
||||
+ visible: true
|
||||
+
|
||||
+ Text {
|
||||
+ objectName: "qtbug51927-text"
|
||||
+ text: qsTr("Hello World")
|
||||
+ anchors.centerIn: parent
|
||||
+ renderType: Text.QtRendering
|
||||
+ }
|
||||
+}
|
||||
diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
|
||||
index 33b8fd0..2d4e227 100644
|
||||
--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
|
||||
+++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
|
||||
@@ -926,5 +926,17 @@ Item {
|
||||
waitForRendering(layout)
|
||||
layout.destroy()
|
||||
}
|
||||
+
|
||||
+
|
||||
+ function test_defaultPropertyAliasCrash() {
|
||||
+ var containerUserComponent = Qt.createComponent("rowlayout/ContainerUser.qml");
|
||||
+ compare(containerUserComponent.status, Component.Ready);
|
||||
+
|
||||
+ var containerUser = containerUserComponent.createObject(testCase);
|
||||
+ verify(containerUser);
|
||||
+
|
||||
+ // Shouldn't crash.
|
||||
+ containerUser.destroy();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 17 11:34:00 UTC 2016 - lbeltrame@kde.org
|
||||
|
||||
- Add fix-crash-on-exit-when-using-default-property-aliases-with-layouts.patch:
|
||||
fix Plasma screenlocker crash on unlock (boo#999548, QTBUG#51927)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 11 08:28:26 UTC 2016 - schwab@suse.de
|
||||
|
||||
- masm-unaligned-stack-pointer.patch: align stack on 16 byte boundaries in
|
||||
the YarrJIT (bsc#1003880)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 28 17:06:29 UTC 2016 - fabian@ritter-vogt.de
|
||||
|
||||
|
@ -43,6 +43,10 @@ Patch3: V4-Always-set-the-tag-when-boxing-a-pointer.patch
|
||||
Patch4: Add-a-facility-to-version-type-information.patch
|
||||
# PATCH-FIX-UPSTREAM V4-Free-up-2-address-bits-in-64bit-mode.patch
|
||||
Patch5: V4-Free-up-2-address-bits-in-64bit-mode.patch
|
||||
# PATCH-FIX-UPSTREAM masm-unaligned-stack-pointer.patch
|
||||
Patch6: masm-unaligned-stack-pointer.patch
|
||||
# PATCH-FIX-UPSTREAM fix-crash-on-exit-when-using-default-property-aliases-with-layouts.patch - fixes crashes in screenloker (boo#999548)
|
||||
Patch7: fix-crash-on-exit-when-using-default-property-aliases-with-layouts.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libQt5Core-private-headers-devel >= %{version}
|
||||
BuildRequires: libQt5Gui-private-headers-devel >= %{version}
|
||||
@ -86,6 +90,8 @@ handling.
|
||||
%ifarch aarch64
|
||||
%patch5 -p1
|
||||
%endif
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%package -n %libname
|
||||
Summary: Qt 5 Declarative Library
|
||||
|
66
masm-unaligned-stack-pointer.patch
Normal file
66
masm-unaligned-stack-pointer.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 4493524ec24afb946eba3942f48d9fc1ff3192c1 Mon Sep 17 00:00:00 2001
|
||||
From: Erik Verbruggen <erik.verbruggen@digia.com>
|
||||
Date: Tue, 9 Aug 2016 10:49:22 +0200
|
||||
Subject: [PATCH] V4: Align stack on 16 byte boundaries in the YarrJIT
|
||||
|
||||
This is the required alignment for Aarch64, and a number of other ABIs
|
||||
prefer this size too when calling into system libraries.
|
||||
|
||||
Change-Id: Ie38cabb77cf83543b915553e69c5c5728a67503b
|
||||
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
||||
---
|
||||
src/3rdparty/masm/yarr/YarrJIT.cpp | 22 ++++++++++++++++++++--
|
||||
1 file changed, 20 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/3rdparty/masm/yarr/YarrJIT.cpp b/src/3rdparty/masm/yarr/YarrJIT.cpp
|
||||
index 5664c585b9..d8211ec4b2 100644
|
||||
--- a/src/3rdparty/masm/yarr/YarrJIT.cpp
|
||||
+++ b/src/3rdparty/masm/yarr/YarrJIT.cpp
|
||||
@@ -338,17 +338,31 @@ class YarrGenerator : private MacroAssembler {
|
||||
jump(Address(stackPointerRegister, frameLocation * sizeof(void*)));
|
||||
}
|
||||
|
||||
+ unsigned alignCallFrameSizeInBytes(unsigned callFrameSize)
|
||||
+ {
|
||||
+ callFrameSize *= sizeof(void*);
|
||||
+ if (callFrameSize / sizeof(void*) != m_pattern.m_body->m_callFrameSize)
|
||||
+ CRASH();
|
||||
+ // Originally, the code was:
|
||||
+// callFrameSize = (callFrameSize + 0x3f) & ~0x3f;
|
||||
+ // However, 64 bytes is a bit surprising. The biggest "alignment" requirement is on Aarch64, where:
|
||||
+ // "SP mod 16 = 0. The stack must be quad-word aligned." (IHI0055B_aapcs64.pdf)
|
||||
+ callFrameSize = (callFrameSize + 0xf) & ~0xf;
|
||||
+ if (!callFrameSize)
|
||||
+ CRASH();
|
||||
+ return callFrameSize;
|
||||
+ }
|
||||
void initCallFrame()
|
||||
{
|
||||
unsigned callFrameSize = m_pattern.m_body->m_callFrameSize;
|
||||
if (callFrameSize)
|
||||
- subPtr(Imm32(callFrameSize * sizeof(void*)), stackPointerRegister);
|
||||
+ subPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister);
|
||||
}
|
||||
void removeCallFrame()
|
||||
{
|
||||
unsigned callFrameSize = m_pattern.m_body->m_callFrameSize;
|
||||
if (callFrameSize)
|
||||
- addPtr(Imm32(callFrameSize * sizeof(void*)), stackPointerRegister);
|
||||
+ addPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister);
|
||||
}
|
||||
|
||||
// Used to record subpatters, should only be called if compileMode is IncludeSubpatterns.
|
||||
@@ -2565,6 +2579,10 @@ class YarrGenerator : private MacroAssembler {
|
||||
if (compileMode == IncludeSubpatterns)
|
||||
loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output);
|
||||
#endif
|
||||
+#elif CPU(ARM64)
|
||||
+ // The ABI doesn't guarantee the upper bits are zero on unsigned arguments, so clear them ourselves.
|
||||
+ zeroExtend32ToPtr(index, index);
|
||||
+ zeroExtend32ToPtr(length, length);
|
||||
#elif CPU(ARM)
|
||||
push(ARMRegisters::r4);
|
||||
push(ARMRegisters::r5);
|
||||
--
|
||||
2.10.1
|
||||
|
Loading…
Reference in New Issue
Block a user