From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6F4C815800A for ; Fri, 14 Jul 2023 07:29:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B5F50E07FE; Fri, 14 Jul 2023 07:29:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9EEE4E07FE for ; Fri, 14 Jul 2023 07:29:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E10EE340BC0 for ; Fri, 14 Jul 2023 07:29:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 77A7BA6A for ; Fri, 14 Jul 2023 07:29:49 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1689319781.efca1f2c0288304eb5cc06500d01d9847da48dc7.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/files/, dev-qt/qtwayland/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-qt/qtwayland/files/qtwayland-5.15.10-Destroy-frame-queue-before-display.patch dev-qt/qtwayland/qtwayland-5.15.10-r1.ebuild X-VCS-Directories: dev-qt/qtwayland/ dev-qt/qtwayland/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: efca1f2c0288304eb5cc06500d01d9847da48dc7 X-VCS-Branch: master Date: Fri, 14 Jul 2023 07:29:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d01ad5ab-1afb-4c49-97ba-483f6608c801 X-Archives-Hash: f11e6fce1ad9468145a5817fef096d4f commit: efca1f2c0288304eb5cc06500d01d9847da48dc7 Author: Sam James gentoo org> AuthorDate: Fri Jul 14 07:29:04 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jul 14 07:29:41 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efca1f2c dev-qt/qtwayland: backport use-after-free fix to 5.15.10-r1 Closes: https://bugs.gentoo.org/910315 Signed-off-by: Sam James gentoo.org> ....15.10-Destroy-frame-queue-before-display.patch | 34 +++++++++++++ dev-qt/qtwayland/qtwayland-5.15.10-r1.ebuild | 57 ++++++++++++++++++++++ 2 files changed, 91 insertions(+) diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.10-Destroy-frame-queue-before-display.patch b/dev-qt/qtwayland/files/qtwayland-5.15.10-Destroy-frame-queue-before-display.patch new file mode 100644 index 000000000000..9844d25dbebf --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.15.10-Destroy-frame-queue-before-display.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/910315 +https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/73 + +From 3a8613b91d2239aebc73b43562f929aa71af0de5 Mon Sep 17 00:00:00 2001 +From: David Redondo +Date: Tue, 11 Apr 2023 14:27:27 +0200 +Subject: [PATCH] Destroy frame queue before display + +wl_event_queue_destroy accesses the display. +Found by running a test under valgrind. + +Pick-to: 6.5 +Change-Id: Ic89cbd3b6e98b4fc9561b0e63b5fab4886a1ec50 +Reviewed-by: David Edmundson +(cherry picked from commit a76bf824fcd1cc3789f0d3454a0423c0241d9718) +--- a/src/client/qwaylanddisplay.cpp ++++ b/src/client/qwaylanddisplay.cpp +@@ -379,11 +379,12 @@ QWaylandDisplay::~QWaylandDisplay(void) + #if QT_CONFIG(cursor) + qDeleteAll(mCursorThemes); + #endif +- if (mDisplay) +- wl_display_disconnect(mDisplay); + + if (m_frameEventQueue) + wl_event_queue_destroy(m_frameEventQueue); ++ ++ if (mDisplay) ++ wl_display_disconnect(mDisplay); + } + + // Steps which is called just after constructor. This separates registry_global() out of the constructor +-- +2.41.0 diff --git a/dev-qt/qtwayland/qtwayland-5.15.10-r1.ebuild b/dev-qt/qtwayland/qtwayland-5.15.10-r1.ebuild new file mode 100644 index 000000000000..7240ae37c5e2 --- /dev/null +++ b/dev-qt/qtwayland/qtwayland-5.15.10-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} != *9999* ]]; then + QT5_KDEPATCHSET_REV=1 + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +inherit qt5-build + +DESCRIPTION="Wayland platform plugin for Qt" + +SLOT=5/${QT5_PV} # bug 815646 +IUSE="vulkan X" + +DEPEND=" + dev-libs/wayland + =dev-qt/qtcore-${QT5_PV}*:5= + =dev-qt/qtdeclarative-${QT5_PV}*:5= + =dev-qt/qtgui-${QT5_PV}*:5=[egl,libinput,vulkan=,X?] + media-libs/libglvnd + vulkan? ( dev-util/vulkan-headers ) + X? ( + =dev-qt/qtgui-${QT5_PV}*[-gles2-only] + x11-libs/libX11 + x11-libs/libXcomposite + ) +" +RDEPEND="${DEPEND}" +BDEPEND="dev-util/wayland-scanner" + +PATCHES=( + # QTBUG-97037, pending upstream: + # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/71 + "${FILESDIR}/${PN}-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch" + "${FILESDIR}/${P}-send-release-button-event-on-pointer-leave.patch" + # bug #910315, pending upstream: + # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/73 + "${FILESDIR}/${P}-Destroy-frame-queue-before-display.patch" +) + +src_configure() { + local myqmakeargs=( + -- + $(qt_use vulkan feature-wayland-vulkan-server-buffer) + $(qt_use X feature-xcomposite-egl) + $(qt_use X feature-xcomposite-glx) + ) + qt5-build_src_configure +} + +src_install() { + qt5-build_src_install + rm "${D}${QT5_BINDIR}"/qtwaylandscanner || die +}