mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user