From 074f26d812887c6ca707ee9909361c5d8aa3cb4b Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sat, 27 Apr 2019 14:22:01 +0200 Subject: kde-frameworks/kglobalaccel: Bump for another crash fix Package-Manager: Portage-2.3.65, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner --- .../kglobalaccel-5.57.0-runtime-crashfix1.patch | 47 ++++++++++++++++++++++ .../kglobalaccel/kglobalaccel-5.57.0-r2.ebuild | 32 +++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch create mode 100644 kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild (limited to 'kde-frameworks/kglobalaccel') diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch new file mode 100644 index 000000000000..68a76d5f00e7 --- /dev/null +++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch @@ -0,0 +1,47 @@ +From 78a711361db3a5156f511eab89ff7ebbc86b9125 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 18 Apr 2019 14:32:11 +0200 +Subject: Copy container in Component::cleanUp before interating + +Summary: +Crash was reported: + +Thread 1 (Thread 0x7fdc95c68800 (LWP 6402)): +[KCrash Handler] +#6 QHashData::nextNode (node=node@entry=0x562f53ffbd10) at tools/qhash.cpp:598 +#7 0x00007fdc95a1fbab in QHash::const_iterator::operator++ (this=) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:395 +#8 KdeDGlobalAccel::Component::cleanUp (this=0x562f53ffb040) at ./src/runtime/component.cpp:163 + +Apparently the container is modified while iterating over it. That does not work with the range-for as it does not detach, as opposed to Q_FOREACH. + +Test Plan: @lbeltrame saw valgrind errors before applying this, but those disappeared with this patch. + +Reviewers: #frameworks, davidedmundson + +Reviewed By: davidedmundson + +Subscribers: lbeltrame, kde-frameworks-devel + +Tags: #frameworks + +Differential Revision: https://phabricator.kde.org/D20659 +--- + src/runtime/component.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletion(-) + +diff --git a/src/runtime/component.cpp b/src/runtime/component.cpp +--- b/src/runtime/component.cpp ++++ b/src/runtime/component.cpp +@@ -158,9 +158,10 @@ + + bool Component::cleanUp() + { +- bool changed = false;; ++ bool changed = false; + +- for (GlobalShortcut *shortcut : qAsConst(_current->_actions)) ++ const auto actions = _current->_actions; ++ for (GlobalShortcut *shortcut : actions) + { + qCDebug(KGLOBALACCELD) << _current->_actions.size(); + if (!shortcut->isPresent()) diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild new file mode 100644 index 000000000000..06ce9c5c409b --- /dev/null +++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Framework to handle global shortcuts" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +LICENSE="LGPL-2+" +IUSE="nls" + +BDEPEND=" + nls? ( $(add_qt_dep linguist-tools) ) +" +DEPEND=" + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kcrash) + $(add_frameworks_dep kdbusaddons) + $(add_frameworks_dep kwindowsystem X) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtx11extras) + x11-libs/libxcb + x11-libs/xcb-util-keysyms +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-runtime-crashfix{,1}.patch ) -- cgit v1.2.3-65-gdbad