On Fri, 4 Oct 2024 at 13:28, Jakub Jelinek <ja...@redhat.com> wrote: > > On Fri, Oct 04, 2024 at 12:52:11PM +0100, Jonathan Wakely wrote: > > This doesn't really belong in our testsuite, because the sole purpose of > > the new test is to find bugs in the Glibc wrappers (like the one linked > > below). But maybe it's a kindness to do it in our testsuite, because we > > already have this test in place, and one Glibc bug was already found > > thanks to Sam running the existing test with _FORTIFY_SOURCE defined. > > > > Should we do this? > > I think so. While those bugs are glibc bugs, libstdc++ uses libc headers > and so if they have namespace cleanness issues, so does libstdc++.
Yeah, we have lots of #undef in that test to deal with libc headers that we can't change, but for Glibc we know we can fix problems much more easily than for e.g. proprietary UNIX headers. > > > Add a new testcase that repeats 17_intro/names.cc but with > > _FORTIFY_SOURCE defined, to find problems in Glibc fortify wrappers like > > https://sourceware.org/bugzilla/show_bug.cgi?id=32052 (which is fixed > > now). > > > > libstdc++-v3/ChangeLog: > > > > PR libstdc++/116210 > > * testsuite/17_intro/names.cc (sz): Undef for versions of Glibc > > that use it in the fortify wrappers. > > * testsuite/17_intro/names_fortify.cc: New test. > > Jakub >