From 9f4aeeabb982cfc4306c9d350dbb68f64914fb32 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 17 Aug 2023 07:44:39 -0700 Subject: [PATCH] QML: remove pthread_attr_init() from stackPropertiesGeneric() The docs for pthread_getattr_np() say: "The pthread_getattr_np() function initializes the thread attributes object referred to by attr" The comment in the glibc pthreads.h implementation even says: /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ Pick-to: 6.5 6.6 Change-Id: I964c2b1e6b834feb9710fffd177c32dbb898fa3c Reviewed-by: Ulf Hermann Reviewed-by: Qt CI Bot --- src/qml/memory/qv4stacklimits.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qml/memory/qv4stacklimits.cpp b/src/qml/memory/qv4stacklimits.cpp index 663ece09a2..b8e7e38b92 100644 --- a/src/qml/memory/qv4stacklimits.cpp +++ b/src/qml/memory/qv4stacklimits.cpp @@ -234,7 +234,6 @@ StackProperties stackPropertiesGeneric(qsizetype stackSize = 0) pthread_t thread = pthread_self(); pthread_attr_t sattr; - pthread_attr_init(&sattr); # if defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(Q_OS_NETBSD) pthread_attr_get_np(thread, &sattr); # else