Jakub Jelinek <ja...@redhat.com> writes:

> 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++.
>
>> 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).

I think yes as well -- we've had a lot of discussions in glibc about
getting to a place where we have tests to check the usability of headers
(there's some for this specific namespace problem but there's some
bigger stuff wrt parsing from Clang and so on) but we're not there yet.

This feels like a cheap way of catching issues, and the fact that nobody
noticed between 2.35 and 2.40 (i.e. ~3 years) means it's worthwhile IMO.

>> 
>> 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

thanks,
sam

Reply via email to