From 9d0673651c57438d51e18c6b8ca894d0491b2df3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 24 Aug 2022 20:48:34 +0100 Subject: gentoo auto-resync : 24:08:2022 - 20:48:33 --- dev-qt/Manifest.gz | Bin 11200 -> 11204 bytes dev-qt/qtcore/Manifest | 2 + .../qtcore/files/qtcore-5.15.5-QTBUG-105286.patch | 165 +++++++++++++++++++++ dev-qt/qtcore/qtcore-5.15.5-r3.ebuild | 105 +++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch create mode 100644 dev-qt/qtcore/qtcore-5.15.5-r3.ebuild (limited to 'dev-qt') diff --git a/dev-qt/Manifest.gz b/dev-qt/Manifest.gz index d8042c0e5dec..f3846ab7442b 100644 Binary files a/dev-qt/Manifest.gz and b/dev-qt/Manifest.gz differ diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest index a5a812eca75f..ea06f4c6c8ef 100644 --- a/dev-qt/qtcore/Manifest +++ b/dev-qt/qtcore/Manifest @@ -1,7 +1,9 @@ +AUX qtcore-5.15.5-QTBUG-105286.patch 6250 BLAKE2B bacfd0420e0a1f163d97d75fd2d6c65d1fbdf2b90ace33129caea3c682f5cc54dd3429bd5a0d5865ad9fe291a8abbc9b5951a2e7791ae283da53e839c51dac0b SHA512 397df84c0984c403e5151a63bbfcd925c0cb05bf4d818089c95a72bc7914666912e441baaad808800425c25a62af003431c5459c55c2c3b3e8ef1c73c7f9755e AUX qtcore-5.15.5-hack_never_use_execinfo.patch 880 BLAKE2B e63e908d592da13f5c762fdd2d38dc223a04dab772381c837a93446d41a16071b51b2b4685084b8de956c5a95b0c71e97a63eb21b99dae764cc202bba899840e SHA512 c9b73d0eb1e957b2ab7b47b4cb7ace72004bf937927572bc86d27536f0b92a4594df8897862090454b1110753af03b6bab3eabdaa728b5cf42b8e2d21ef039cb AUX qtcore-5.15.5-slibtool.patch 867 BLAKE2B 0e368bac0d3a066e64a45162ba874a857fa37550ae8b2a9d9378d1c864553bf793c53d5e3079f3e80a4c7f5e03201a0a45d084d0dc83fc35ec509f6ceae50188 SHA512 fdc58a17685ed2c66ab68741778a708dd3869ae1fc49b94bef676b96cab3895e68f835dd9e9653ffe707f179a9be5cbe72491b5d1923ad0c4136fc0f92b4033a DIST qtbase-5.15-gentoo-patchset-1.tar.xz 4204 BLAKE2B 1399eb6f4c776d370e1837351a72b604440658a3a2d1bd0c725b9ef149b09d236347f5f4b37f652c33310048a0a7df54e24453b404dc45507fd4f7c5fdf144cd SHA512 c857fc746bacb047321cdb762f3c7c48ce2a0d24045a9e708edd38532568dbbc74e9e971425a72a3c2a5ca0662b3e6333831f6c1b7746525b99d46000b63111f DIST qtbase-5.15.5-gentoo-kde-2.tar.xz 526240 BLAKE2B 68ecca0805c2ea0b29b65706b0c03a3ead1d106e089f2a48a988035842d0cc8ac67d950cbc67ae8f8be860fd11443579d3e06bfe96a2e3161f94e07206d2815e SHA512 d877a2eb4cd05b712a7db6a943f955d3ced88f51efe3e29b2d6716fba4da08398dbd2ed580ca5b9bfbd92a5a20e34451e06a324274447d4b3692b25af4ff8ddf DIST qtbase-everywhere-opensource-src-5.15.5.tar.xz 50247388 BLAKE2B e9bbfe8e73e6f25ccadeef722818b5aeb82d1f136bec21fcbc3b26bf76044b38f25c7268010c648e1161e9b61013b8b775f17b9fdcfdd70402bdfbf70bf7f9d5 SHA512 ce80eedc88abbd5a200bacc10a8e94adc1ef2122ac220715ba084adf1e32d67f2dc66168503de5fb5b5a6ab15f7a75ca23dc9956aed12ead994a8ffa6291ef87 EBUILD qtcore-5.15.5-r2.ebuild 2317 BLAKE2B e5e64c0f64e4e0b2463f67c4bcb19e00f126f88d4527e1bd9703ffe26ace46a8181f3b8b3d052c1d5ad930077160a61a3046a0829279c6c6644fc5ff59ac5fb9 SHA512 8c852de875ced33d03aaf0d896818dd11525fd1853313267c539f561623e42676bc904e38f4a421c862f44a4d7f33a92d8348c78bad833a3cbb69bc4a6fd7a6e +EBUILD qtcore-5.15.5-r3.ebuild 2363 BLAKE2B c5ba2585e246c9a6f2b50e46af7e54e4972b5e53cbd63fbdd3042d034e93f3dce46f3792d7c9e36190df2a233953ec17166c2cf6f922030aea6f163537d27bd6 SHA512 f9241f381e092bb2c8017023569e6520385a322eb80933c545d05475388c7c01072ae0d298d3b2e46c76e3fd9d7fb678757997424c68789cfa5f034d9bb43117 MISC metadata.xml 833 BLAKE2B 79b441c34e55017f23dd85cdb062ef4cbcfce05dff74936de887256ba8b9b596632b570b55b7014c38467829751771bb116f067cd6a246a11309f20b67fb55f0 SHA512 f1ffedc2ad17d198ba14a9a93e6c8dd35a7709e6f1e07dae606c16c05868f2f8e696f25fa5cf2602ed50f41eb5a914ff0d652b9ac37163e5130ddbfb475a1ff5 diff --git a/dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch b/dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch new file mode 100644 index 000000000000..985dd283dbd4 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch @@ -0,0 +1,165 @@ +From 7f9253defd2e90f900d963c6d248a2a0bdaca1a8 Mon Sep 17 00:00:00 2001 +From: Volker Hilsheimer +Date: Tue, 16 Aug 2022 15:32:58 +0200 +Subject: [PATCH] Don't access QObjectPrivate::declarativeData unguarded +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The QObjectPrivate::declarativeData member is stored in a union with +currentChildBeingDeleted. The QObject destructor always sets the +currentChildBeingDeleted member of the union. It also sets the +isDeletingChildren bool, which is the only way to find out which union +member we can safely access. + +While the QObject destructor is deleting children and isDeletingChildren +is set, we must not access the declarativeData member of the union. + +Add a test case that initializes the function pointers for the +declarative handlers and constructs a situation where an object +emits a signal while it is destroying children. + +Fixes: QTBUG-105286 +Pick-to: 6.4 6.3 6.3.2 6.2 5.15 +Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02 +Reviewed-by: Qt CI Bot +Reviewed-by: MÃ¥rten Nordheim +(cherry picked from commit 3be99799a675a631c67e05897383af9abbc377b3) +--- + src/corelib/kernel/qobject.cpp | 4 +- + src/corelib/kernel/qobject_p.h | 2 +- + .../corelib/kernel/qobject/tst_qobject.cpp | 77 +++++++++++++++++++ + 3 files changed, 80 insertions(+), 3 deletions(-) + +diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp +index 0124f88abd..1f3843669b 100644 +--- a/src/corelib/kernel/qobject.cpp ++++ b/src/corelib/kernel/qobject.cpp +@@ -992,7 +992,7 @@ QObject::~QObject() + emit destroyed(this); + } + +- if (d->declarativeData) { ++ if (!d->isDeletingChildren && d->declarativeData) { + if (static_cast(d->declarativeData)->ownedByQml1) { + if (QAbstractDeclarativeData::destroyed_qml1) + QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); +@@ -2583,7 +2583,7 @@ int QObject::receivers(const char *signal) const + if (!d->isSignalConnected(signal_index)) + return receivers; + +- if (d->declarativeData && QAbstractDeclarativeData::receivers) { ++ if (!d->isDeletingChildren && d->declarativeData && QAbstractDeclarativeData::receivers) { + receivers += QAbstractDeclarativeData::receivers(d->declarativeData, this, + signal_index); + } +diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h +index 66c19d174e..46dcb93521 100644 +--- a/src/corelib/kernel/qobject_p.h ++++ b/src/corelib/kernel/qobject_p.h +@@ -428,7 +428,7 @@ inline void QObjectPrivate::checkForIncompatibleLibraryVersion(int version) cons + + inline bool QObjectPrivate::isDeclarativeSignalConnected(uint signal_index) const + { +- return declarativeData && QAbstractDeclarativeData::isSignalConnected ++ return !isDeletingChildren && declarativeData && QAbstractDeclarativeData::isSignalConnected + && QAbstractDeclarativeData::isSignalConnected(declarativeData, q_func(), signal_index); + } + +diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +index 9bd66c0835..ed4a0bae5d 100644 +--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp ++++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +@@ -158,6 +158,7 @@ private slots: + void nullReceiver(); + void functorReferencesConnection(); + void disconnectDisconnects(); ++ void declarativeData(); + }; + + struct QObjectCreatedOnShutdown +@@ -7679,5 +7680,81 @@ void tst_QObject::disconnectDisconnects() + Q_STATIC_ASSERT(QtPrivate::HasQ_OBJECT_Macro::Value); + Q_STATIC_ASSERT(!QtPrivate::HasQ_OBJECT_Macro::Value); + ++#ifdef QT_BUILD_INTERNAL ++/* ++ Since QObjectPrivate stores the declarativeData pointer in a union with the pointer ++ to the currently destroyed child, calls to the QtDeclarative handlers need to be ++ correctly guarded. QTBUG-105286 ++*/ ++namespace QtDeclarative { ++static QAbstractDeclarativeData *theData; ++ ++static void destroyed(QAbstractDeclarativeData *data, QObject *) ++{ ++ QCOMPARE(data, theData); ++} ++static void signalEmitted(QAbstractDeclarativeData *data, QObject *, int, void **) ++{ ++ QCOMPARE(data, theData); ++} ++// we can't use QCOMPARE in the next two functions, as they don't return void ++static int receivers(QAbstractDeclarativeData *data, const QObject *, int) ++{ ++ QTest::qCompare(data, theData, "data", "theData", __FILE__, __LINE__); ++ return 0; ++} ++static bool isSignalConnected(QAbstractDeclarativeData *data, const QObject *, int) ++{ ++ QTest::qCompare(data, theData, "data", "theData", __FILE__, __LINE__); ++ return true; ++} ++ ++class Object : public QObject ++{ ++ Q_OBJECT ++public: ++ using QObject::QObject; ++ ~Object() ++ { ++ if (Object *p = static_cast(parent())) ++ p->emitSignal(); ++ } ++ ++ void emitSignal() ++ { ++ emit theSignal(); ++ } ++ ++signals: ++ void theSignal(); ++}; ++ ++} ++#endif ++ ++void tst_QObject::declarativeData() ++{ ++#ifdef QT_BUILD_INTERNAL ++ QScopedValueRollback destroyed(QAbstractDeclarativeData::destroyed, ++ QtDeclarative::destroyed); ++ QScopedValueRollback signalEmitted(QAbstractDeclarativeData::signalEmitted, ++ QtDeclarative::signalEmitted); ++ QScopedValueRollback receivers(QAbstractDeclarativeData::receivers, ++ QtDeclarative::receivers); ++ QScopedValueRollback isSignalConnected(QAbstractDeclarativeData::isSignalConnected, ++ QtDeclarative::isSignalConnected); ++ ++ QtDeclarative::Object p; ++ QObjectPrivate *priv = QObjectPrivate::get(&p); ++ priv->declarativeData = QtDeclarative::theData = new QAbstractDeclarativeData; ++ ++ connect(&p, &QtDeclarative::Object::theSignal, &p, []{ ++ }); ++ ++ QtDeclarative::Object *child = new QtDeclarative::Object; ++ child->setParent(&p); ++#endif ++} ++ + QTEST_MAIN(tst_QObject) + #include "tst_qobject.moc" +-- +GitLab + diff --git a/dev-qt/qtcore/qtcore-5.15.5-r3.ebuild b/dev-qt/qtcore/qtcore-5.15.5-r3.ebuild new file mode 100644 index 000000000000..521f2c4e0632 --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.15.5-r3.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +QT5_KDEPATCHSET_REV=2 +QT5_MODULE="qtbase" +inherit linux-info qt5-build + +DESCRIPTION="Cross-platform application development framework" +SLOT=5/${QT5_PV} + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +IUSE="icu old-kernel systemd" + +DEPEND=" + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2[pcre16,unicode] + sys-libs/zlib:= + icu? ( dev-libs/icu:= ) + !icu? ( virtual/libiconv ) + systemd? ( sys-apps/systemd:= ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-hack_never_use_execinfo.patch" + "${FILESDIR}/${P}-QTBUG-105286.patch" +) + +QT5_TARGET_SUBDIRS=( + src/tools/bootstrap + src/tools/moc + src/tools/rcc + src/corelib + src/tools/qlalr + doc +) + +QT5_GENTOO_PRIVATE_CONFIG=( + !:network + !:sql + !:testlib + !:xml +) + +pkg_pretend() { + use kernel_linux || return + get_running_version + if kernel_is -lt 4 11 && ! use old-kernel; then + ewarn "The running kernel is older than 4.11. USE=old-kernel is needed for" + ewarn "dev-qt/qtcore to function on this kernel properly. Bugs #669994, #672856" + fi +} + +src_prepare() { + # don't add -O3 to CXXFLAGS, bug 549140 + sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die + + # fix missing qt_version_tag symbol w/ LTO, bug 674382 + sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die + + eapply "${FILESDIR}/${P}-slibtool.patch" # bug 792804, TODO: merge into _QT5_GENTOOPATCHSET_REV + + qt5-build_src_prepare +} + +src_configure() { + local myconf=( + $(qt_use icu) + $(qt_use !icu iconv) + $(qt_use systemd journald) + ) + use old-kernel && myconf+=( + -no-feature-renameat2 # needs Linux 3.16, bug 669994 + -no-feature-getentropy # needs Linux 3.17, bug 669994 + -no-feature-statx # needs Linux 4.11, bug 672856 + ) + qt5-build_src_configure +} + +src_install() { + qt5-build_src_install + qt5_symlink_binary_to_path qmake 5 + + local flags=( + DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG + OPENGL OPENSSL SSL WIDGETS + ) + + for flag in ${flags[@]}; do + cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die + + #if defined(QT_NO_${flag}) && defined(QT_${flag}) + # undef QT_NO_${flag} + #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) + # define QT_NO_${flag} + #endif + _EOF_ + done +} -- cgit v1.2.3