From c2322a561f74b8fa41b9d9c6b8eb57e28de46f3e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 18 May 2020 18:25:18 +0200 Subject: 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 --- nptl/allocatestack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nptl/allocatestack.c') diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index c94980c21c..d16f3d71f8 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -425,7 +425,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, else { lll_lock (__default_pthread_attr_lock, LLL_PRIVATE); - size = __default_pthread_attr.stacksize; + size = __default_pthread_attr.internal.stacksize; lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE); } -- cgit v1.2.3