commit:     313ee5bd17f851405ea0f9176797bc7355a9e648
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 29 04:44:24 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Nov 29 05:36:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=313ee5bd

dev-qt/qtbase: re-add forkfd stacksize patch but with 32k

Bug: https://bugs.gentoo.org/918664
Bug: https://bugs.gentoo.org/915695
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase-6.6.1-forkfd-childstack-size.patch      | 23 ++++++++++++++++++++++
 ...{qtbase-6.6.1.ebuild => qtbase-6.6.1-r1.ebuild} |  1 +
 dev-qt/qtbase/qtbase-6.6.9999.ebuild               |  1 +
 dev-qt/qtbase/qtbase-6.9999.ebuild                 |  1 +
 4 files changed, 26 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.6.1-forkfd-childstack-size.patch 
b/dev-qt/qtbase/files/qtbase-6.6.1-forkfd-childstack-size.patch
new file mode 100644
index 000000000000..6b0ff1709abb
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.1-forkfd-childstack-size.patch
@@ -0,0 +1,23 @@
+Avoid crash that happens for some users in qsb, qmake, and
+potentially other Qt tools when ran under sandbox leading
+to build failures for qtdeclarative and other packages.
+
+Former fix involved replacing 4096 by SIGSTKSZ but
+bug #918664 shown that this may be insufficient so this
+tries 32k instead.
+
+https://bugs.gentoo.org/908809
+https://bugs.gentoo.org/908816
+https://bugs.gentoo.org/913493
+https://bugs.gentoo.org/915695
+https://bugs.gentoo.org/918664
+https://codereview.qt-project.org/c/qt/qtbase/+/513140
+--- a/src/3rdparty/forkfd/forkfd_linux.c
++++ b/src/3rdparty/forkfd/forkfd_linux.c
+@@ -158,5 +158,5 @@
+ int system_vforkfd(int flags, pid_t *ppid, int (*childFn)(void *), void 
*token, int *system)
+ {
+-    __attribute__((aligned(64))) char childStack[SIGSTKSZ];
++    __attribute__((aligned(64))) char childStack[32768];
+     pid_t pid;
+     int pidfd;

diff --git a/dev-qt/qtbase/qtbase-6.6.1.ebuild 
b/dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.6.1.ebuild
rename to dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
index adbaf526bcf1..90146aaed3c8 100644
--- a/dev-qt/qtbase/qtbase-6.6.1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
        "${FILESDIR}"/${PN}-6.5.2-no-glx.patch
        "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+       "${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.6.9999.ebuild 
b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
index adbaf526bcf1..90146aaed3c8 100644
--- a/dev-qt/qtbase/qtbase-6.6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
        "${FILESDIR}"/${PN}-6.5.2-no-glx.patch
        "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+       "${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.9999.ebuild 
b/dev-qt/qtbase/qtbase-6.9999.ebuild
index 9516155745e3..4de73e3c0c2f 100644
--- a/dev-qt/qtbase/qtbase-6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.9999.ebuild
@@ -137,6 +137,7 @@ PDEPEND="
 PATCHES=(
        "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
        "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+       "${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 )
 
 src_prepare() {

Reply via email to