1
0
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:
Florian Weimer
2020-05-18 18:25:18 +02:00
parent 86ed0774cf
commit c2322a561f
8 changed files with 14 additions and 15 deletions

View File

@ -199,7 +199,7 @@ enum
/* Default pthread attributes. */
extern struct pthread_attr __default_pthread_attr attribute_hidden;
extern union pthread_attr_transparent __default_pthread_attr attribute_hidden;
extern int __default_pthread_attr_lock attribute_hidden;
/* Size and alignment of static TLS block. */