Bug 2089211

Summary: glibc: stpncpy build failure with _FORTIFY_SOURCE and old gcc
Product: Red Hat Enterprise Linux 8 Reporter: Siddhesh Poyarekar <sipoyare>
Component: glibcAssignee: Siddhesh Poyarekar <sipoyare>
Status: CLOSED NOTABUG QA Contact: Sergey Kolosov <skolosov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.7CC: ashankar, codonell, dj, fweimer, mnewsome, pfrankli, sipoyare
Target Milestone: rcKeywords: Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-23 14:49:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2033684    

Description Siddhesh Poyarekar 2022-05-23 08:53:58 UTC
Description of problem:
This was introduced by one of the patches to implement FORTIFY_SOURCE=3 support.  When a program is built with a gcc version older than 4.7 or clang version older than 2.6 or a compiler that does not identify as gcc or clang, it will fail to build due to a typo in string_fortified.h.

This was discovered in NixOS, which builds some packages with gcc 4.1.0:

https://sourceware.org/pipermail/libc-alpha/2022-May/138981.html

Comment 1 Florian Weimer 2022-05-23 08:56:45 UTC
Historic GCC binaries are here: https://pagure.io/glibc/glibc-test-binaries/

The repository has wrapper scripts, so that the binaries still should work on Red Hat Enterprise Linux 8.

Comment 3 Siddhesh Poyarekar 2022-05-23 14:49:00 UTC
I just noticed that I had not backported the offending commit to rhel-8, because there are no access attributes on those functions in RHEL-8.  Nothing to fix here then.