From 54059d0dffd1966c8a442b3675eb979c32c16cbe Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 26 Sep 2023 12:36:09 +0200 Subject: [PATCH] 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. Pick-to: 6.6 6.5 Fixes: QTBUG-117513 Change-Id: Ic851ba2ffcf13d268b3a53d926cb92f7bed7a3d9 Reviewed-by: Sami Shalayel Reviewed-by: Fabian Kosmale --- src/qml/memory/qv4stacklimits.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qml/memory/qv4stacklimits.cpp b/src/qml/memory/qv4stacklimits.cpp index 01c854899a6..ef5c007c198 100644 --- a/src/qml/memory/qv4stacklimits.cpp +++ b/src/qml/memory/qv4stacklimits.cpp @@ -260,6 +260,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);