[PATCH][BZ #11787] Fix stack guard size accounting

Florian Weimer fweimer@redhat.com
Wed Dec 20 21:24:00 GMT 2017


On 12/20/2017 06:46 PM, Carlos O'Donell wrote:
>> diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
>> index 869e926f17aa218ab0b122eeda935069ef419ae5..e5c0bdfbebbcc501e4135280f09d55d021943363 100644
>> --- a/nptl/nptl-init.c
>> +++ b/nptl/nptl-init.c
>> @@ -473,8 +473,5 @@ strong_alias (__pthread_initialize_minimal_internal,
>>   size_t
>>   __pthread_get_minstack (const pthread_attr_t *attr)
>>   {
>> -  struct pthread_attr *iattr = (struct pthread_attr *) attr;
>> -
>> -  return (GLRO(dl_pagesize) + __static_tls_size + PTHREAD_STACK_MIN
>> -	  + iattr->guardsize);
>> +  return GLRO(dl_pagesize) + __static_tls_size + PTHREAD_STACK_MIN;
>>   }
> We no longer need pthread_attr_t. Please refactor.

Please move this into a separate patch.  The function also needs to be 
renamed because there is code out there which attempts to call it if it 
exists (notably, in Firefox and Rust—you might not see it because some 
refactoring broke it and switched from C linkage to Rust linkage, so the 
function is never found).

Thanks,
Florian



More information about the Libc-alpha mailing list