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 C345515800F for ; Sun, 5 Feb 2023 22:37:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6718E07D1; Sun, 5 Feb 2023 22:37:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 C8817E07D1 for ; Sun, 5 Feb 2023 22:37:38 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AF58A340B53 for ; Sun, 5 Feb 2023 22:37:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 00D5B893 for ; Sun, 5 Feb 2023 22:37:36 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1675636637.957b23ec2630a603c6c00905f21529b9c4bc4653.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch X-VCS-Directories: dev-qt/qtcore/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 957b23ec2630a603c6c00905f21529b9c4bc4653 X-VCS-Branch: master Date: Sun, 5 Feb 2023 22:37:36 +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: bc8e4d68-b0bc-4374-bf15-3ca1730c96d7 X-Archives-Hash: f768968b003365e831a7585ad5475320 commit: 957b23ec2630a603c6c00905f21529b9c4bc4653 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Feb 5 22:37:17 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Feb 5 22:37:17 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=957b23ec dev-qt/qtcore: Re-add accidentally removed patch Closes: https://bugs.gentoo.org/893322 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.15.8-fix-crash-w-debug.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch b/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch new file mode 100644 index 000000000000..74f5ed5c4886 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch @@ -0,0 +1,41 @@ +From 0c0b34badb8a56f5c0d7d43c3847508774c8e553 Mon Sep 17 00:00:00 2001 +From: Harald Sitter +Date: Mon, 2 Jan 2023 12:38:02 +0100 +Subject: [PATCH] correctly set up ref counting in + QThreadPool::tryStart(std::function) + +this function was inconsistent with the QThreadPool::tryStart(QRunnable) +overload, where ref counting does get set up correctly. the lack of ref +counting setup would later cause trouble because we assert the ref +counting state all over QThreadPool. to prevent failed assertions we +correctly set up ref counting now. + +this change is not applicable to Qt6 because the ref counting has +already been removed there: +https://github.com/qt/qtbase/commit/ecfda98d1f91c6a7da0d89826558d856cd88e670 + +BUG: 449688 +--- + src/corelib/thread/qthreadpool.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp +index 40cc646519..8aa06a4c8f 100644 +--- a/src/corelib/thread/qthreadpool.cpp ++++ b/src/corelib/thread/qthreadpool.cpp +@@ -602,8 +602,12 @@ bool QThreadPool::tryStart(std::function functionToRun) + return false; + + QRunnable *runnable = QRunnable::create(std::move(functionToRun)); ++ Q_ASSERT(runnable->ref == 0); ++ ++runnable->ref; + if (d->tryStart(runnable)) + return true; ++ --runnable->ref; ++ Q_ASSERT(runnable->ref == 0); + delete runnable; + return false; + } +-- +GitLab +