summaryrefslogtreecommitdiff
path: root/nptl/nptl-init.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-05-18 18:25:18 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-06-02 10:32:37 +0200
commitc2322a561f74b8fa41b9d9c6b8eb57e28de46f3e (patch)
tree85673d97ee3c4a1d79d67e3e267a12c63cf7946f /nptl/nptl-init.c
parent86ed0774cf0de1d281ca3c773758c9fe6f2784b4 (diff)
downloadglibc-c2322a561f74b8fa41b9d9c6b8eb57e28de46f3e.tar.gz
nptl: Change type of __default_pthread_attr
union pthread_attr_transparent has always the correct size, even if pthread_attr_t has padding that is not present in struct pthread_attr. This should not result in an observable behavioral change. The existing code appears to have been correct, but it was brittle because it was not clear which functions were allowed to write to an entire pthread_attr_t argument (e.g., by copying it). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/nptl-init.c')
-rw-r--r--nptl/nptl-init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 96b1444a01..d4cf20e3d1 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -318,8 +318,8 @@ __pthread_initialize_minimal_internal (void)
/* Round the resource limit up to page size. */
limit.rlim_cur = ALIGN_UP (limit.rlim_cur, pagesz);
lll_lock (__default_pthread_attr_lock, LLL_PRIVATE);
- __default_pthread_attr.stacksize = limit.rlim_cur;
- __default_pthread_attr.guardsize = GLRO (dl_pagesize);
+ __default_pthread_attr.internal.stacksize = limit.rlim_cur;
+ __default_pthread_attr.internal.guardsize = GLRO (dl_pagesize);
lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE);
#ifdef SHARED