[PATCHv3] Apply asm redirections in stdio.h before first use [BZ #27087]

Carlos O'Donell carlos@redhat.com
Tue Jul 12 13:36:42 GMT 2022


On 7/11/22 16:33, Paul E Murphy via Libc-alpha wrote:
> 
> 
> On 7/7/22 4:12 PM, Tulio Magno Quites Machado Filho wrote:
>> Changes since v2:
>>   - Fixed copyright years.
>>   - Added access attribute to __vsnprintf_chk.
>>   - Renamed headers stdio2-dec.h to stdio2-decl.h.
>>
>> Changes since v1:
>>   - Removed the duplicated inclusion of bits/floatn.h.
>>
>> I plan to backport this fix to at least glibc 2.35.
>>
>> --- 8< ---
>>
>> Compilers may not be able to apply asm redirections to functions after
>> these functions are used for the first time, e.g. clang 13.
>> Fix [BZ #27087] by applying all long double-related asm redirections
>> before using functions in bits/stdio.h.
>> However, as these asm redirections depend on the declarations provided
>> by libio/bits/stdio2.h, this header was split in 2:
>>
>>   - libio/bits/stdio2-decl.h contains all function declarations;
>>   - libio/bits/stdio2.h remains with the remaining contents, including
>>     redirections.
>>
>> This also adds the access attribute to __vsnprintf_chk that was missing.
>>
>> Tested with build-many-glibcs.py.
> 
> Thanks. LGTM.
> 
> Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
> 

This patch was tested in Fedora by our downstream users:
https://bugzilla.redhat.com/show_bug.cgi?id=2100546#c24

This LGTM as RM for glibc 2.36.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list