aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-09-26 12:36:09 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-10-04 16:21:59 +0000
commitb0f359bf2fc7ab0093f23a5d76348e1c08133221 (patch)
tree13183dd9541f004ce025e57c9b2c5c1263ead682
parent3f3e7127861ee51916368073249450ef6f92ee18 (diff)
QtQml: Re-add pthread_attr_init() to stackPropertiesGeneric()
Before calling pthread_attr_get_np(), as opposed to pthread_getattr_np(), we do need to call pthread_attr_init(). Both the FreeBSD and the NetBSD manpages tell us to do so. Amends commit 9f4aeeabb982cfc4306c9d350dbb68f64914fb32. Fixes: QTBUG-117513 Change-Id: Ic851ba2ffcf13d268b3a53d926cb92f7bed7a3d9 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 54059d0dffd1966c8a442b3675eb979c32c16cbe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fff3ee966a6887dbfdedd01f7dcdd8770029b340)
-rw-r--r--src/qml/memory/qv4stacklimits.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/memory/qv4stacklimits.cpp b/src/qml/memory/qv4stacklimits.cpp
index 68ef7a366a..429520e527 100644
--- a/src/qml/memory/qv4stacklimits.cpp
+++ b/src/qml/memory/qv4stacklimits.cpp
@@ -235,6 +235,7 @@ StackProperties stackPropertiesGeneric(qsizetype stackSize = 0)
pthread_t thread = pthread_self();
pthread_attr_t sattr;
# if defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(Q_OS_NETBSD)
+ pthread_attr_init(&sattr);
pthread_attr_get_np(thread, &sattr);
# else
pthread_getattr_np(thread, &sattr);