Skip to content

Commit

Permalink
QtQml: Re-add pthread_attr_init() to stackPropertiesGeneric()
Browse files Browse the repository at this point in the history
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 9f4aeea.

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>
  • Loading branch information
Ulf Hermann committed Sep 29, 2023
1 parent 9427ee7 commit 54059d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/qml/memory/qv4stacklimits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 54059d0

Please sign in to comment.