diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-26 12:36:09 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-29 18:04:11 +0200 |
commit | 54059d0dffd1966c8a442b3675eb979c32c16cbe (patch) | |
tree | a9471975d048e60a3045edcfc1b3264c9f54b8c1 /src/qml/memory | |
parent | 9427ee785c832db191da80402c8f40ec3ae81324 (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.
Pick-to: 6.6 6.5
Fixes: QTBUG-117513
Change-Id: Ic851ba2ffcf13d268b3a53d926cb92f7bed7a3d9
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/memory')
-rw-r--r-- | src/qml/memory/qv4stacklimits.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/memory/qv4stacklimits.cpp b/src/qml/memory/qv4stacklimits.cpp index 01c854899a..ef5c007c19 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); |