[Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 9 12:02:46 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104731

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:6190ebb07cdc2de339c19b236b67bc4106d2bb54

commit r11-9969-g6190ebb07cdc2de339c19b236b67bc4106d2bb54
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri May 6 14:31:06 2022 +0100

    libstdc++: Fix test that fails on Solaris [PR104731]

    On Solaris the dirent::d_name member is a single char, causing this test
    to fail with warnings about buffer overflow. Change the test to use a
    union with additional space for writing a string to the d_name member.

    libstdc++-v3/ChangeLog:

            PR libstdc++/104731
            * testsuite/27_io/filesystem/iterators/error_reporting.cc:
            Use a trailing char array as storage for dirent::d_name.

    (cherry picked from commit aa8bdfee1db818b9a56908ab0197ff02c54bf281)


More information about the Gcc-bugs mailing list