public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs
@ 2022-03-01 10:40 ro at gcc dot gnu.org
  2022-03-01 10:41 ` [Bug libstdc++/104731] " ro at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: ro at gcc dot gnu.org @ 2022-03-01 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104731
           Summary: 27_io/filesystem/iterators/error_reporting.cc FAILs
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: *-*-solaris2.11

Since 20220202, the 27_io/filesystem/iterators/error_reporting.cc test FAILs on
Solaris (32 and 64-bit, sparc and x86):

+FAIL: 27_io/filesystem/iterators/error_reporting.cc (test for excess errors)

Excess errors:
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/bits/char_traits.h:431:
warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' writing 7
bytes into a region of size 6 overflows the destination [-Wstringop-overflow=]

Full output is

In file included from
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/ios:40,
                 from
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/istream:38,
                 from
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/sstream:38,
                 from
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/complex:45,
                 from
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/ccomplex:39,
                 from
/vol/gcc/src/hg/master/local/libstdc++-v3/include/precompiled/stdc++.h:54:
In static member function 'static std::char_traits<char>::char_type*
std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)',
    inlined from 'dirent* readdir(DIR*)' at
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc:52:
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/bits/char_traits.h:431:
warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' writing 7
bytes into a region of size 6 overflows the destination [-Wstringop-overflow=]
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc:
In function 'dirent* readdir(DIR*)':
/var/gcc/regression/master/11.4-gcc-gas/build/sparc-sun-solaris2.11/libstdc++-v3/include/bits/char_traits.h:431:
warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' writing 7
bytes into a region of size 6 overflows the destination [-Wstringop-overflow=]
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc:
In function 'dirent* readdir(DIR*)':
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/27_io/filesystem/iterators/error_reporting.cc:31:
note: at offset 18 into destination object 'global_dirent' of size 24

<sys/dirent.h> has

        char            d_name[1];      /* name of file */

which conforms to POSIX.1 AFAICS.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
@ 2022-03-01 10:41 ` ro at gcc dot gnu.org
  2022-03-01 12:27 ` redi at gcc dot gnu.org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ro at gcc dot gnu.org @ 2022-03-01 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
  2022-03-01 10:41 ` [Bug libstdc++/104731] " ro at gcc dot gnu.org
@ 2022-03-01 12:27 ` redi at gcc dot gnu.org
  2022-03-01 12:30 ` redi at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2022-03-01 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-03-01
           Keywords|                            |testsuite-fail

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
  2022-03-01 10:41 ` [Bug libstdc++/104731] " ro at gcc dot gnu.org
  2022-03-01 12:27 ` redi at gcc dot gnu.org
@ 2022-03-01 12:30 ` redi at gcc dot gnu.org
  2022-03-01 12:33 ` redi at gcc dot gnu.org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2022-03-01 12:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Either we need to embed the global dirent into a larger structure with trailing
storage for the file name, or we just disable the test on Solaris (maybe only
run it for *-*-linux-gnu, since it's not testing target-specific code anyway).

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-03-01 12:30 ` redi at gcc dot gnu.org
@ 2022-03-01 12:33 ` redi at gcc dot gnu.org
  2022-05-06  8:32 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2022-03-01 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> Either we need to embed the global dirent into a larger structure with
> trailing storage for the file name,

And then we'd still need to disable that warning, because it will still
complain that we're writing to the d_name[1] array, even if there is actually
space available after that array.

So I think just using a target selector for the test is probably the right
answer.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-03-01 12:33 ` redi at gcc dot gnu.org
@ 2022-05-06  8:32 ` jakub at gcc dot gnu.org
  2022-05-06 13:52 ` cvs-commit at gcc dot gnu.org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.0                        |12.2

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-05-06  8:32 ` jakub at gcc dot gnu.org
@ 2022-05-06 13:52 ` cvs-commit at gcc dot gnu.org
  2022-05-06 13:54 ` redi at gcc dot gnu.org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-06 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:aa8bdfee1db818b9a56908ab0197ff02c54bf281

commit r13-154-gaa8bdfee1db818b9a56908ab0197ff02c54bf281
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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-05-06 13:52 ` cvs-commit at gcc dot gnu.org
@ 2022-05-06 13:54 ` redi at gcc dot gnu.org
  2022-05-09 10:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-06 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This should be fixed on trunk, but I'm unable to test on Solaris right now:

ld.so.1: g++: fatal: relocation error: file
/export/home/jwakely/gcc/12/bin/g++: symbol stpcpy: referenced symbol not found


If it works for your testers I'll backport it to gcc-12 as well.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-05-06 13:54 ` redi at gcc dot gnu.org
@ 2022-05-09 10:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2022-05-09 11:27 ` redi at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2022-05-09 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> This should be fixed on trunk, but I'm unable to test on Solaris right now:

It is indeed, tested on Solaris 11.3 and 11.4, SPARC and x86.

> ld.so.1: g++: fatal: relocation error: file
> /export/home/jwakely/gcc/12/bin/g++: symbol stpcpy: referenced symbol not found

This is weird: stpcpy is in Solaris 11 libc since 11.0.  What version of
Solaris exactly does this happen on?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-05-09 10:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2022-05-09 11:27 ` redi at gcc dot gnu.org
  2022-05-09 11:29 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-09 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #6)
> > --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> > This should be fixed on trunk, but I'm unable to test on Solaris right now:
> 
> It is indeed, tested on Solaris 11.3 and 11.4, SPARC and x86.

Gret, thanks for checking. I'll backport to gcc-11 and gcc-12.

> 
> > ld.so.1: g++: fatal: relocation error: file
> > /export/home/jwakely/gcc/12/bin/g++: symbol stpcpy: referenced symbol not found
> 
> This is weird: stpcpy is in Solaris 11 libc since 11.0.  What version of
> Solaris exactly does this happen on?

Ah, I think the problem is that $HOME is shared between the Solaris 10 and 11
machines in the GCC compile farm, and I was probably trying to use the GCC
built on Solaris 11 on the SOlaris 10 machine.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-05-09 11:27 ` redi at gcc dot gnu.org
@ 2022-05-09 11:29 ` cvs-commit at gcc dot gnu.org
  2022-05-09 11:33 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 11:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:df8e384d5f91076f35852baed0974793b37ec313

commit r12-8358-gdf8e384d5f91076f35852baed0974793b37ec313
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)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-05-09 11:29 ` cvs-commit at gcc dot gnu.org
@ 2022-05-09 11:33 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2022-05-09 12:02 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2022-05-09 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
>> It is indeed, tested on Solaris 11.3 and 11.4, SPARC and x86.
>
> Gret, thanks for checking. I'll backport to gcc-11 and gcc-12.

Excellent, thanks.

>> > ld.so.1: g++: fatal: relocation error: file
>> > /export/home/jwakely/gcc/12/bin/g++: symbol stpcpy: referenced symbol
>> > not found
>> 
>> This is weird: stpcpy is in Solaris 11 libc since 11.0.  What version of
>> Solaris exactly does this happen on?
>
> Ah, I think the problem is that $HOME is shared between the Solaris 10 and 11
> machines in the GCC compile farm, and I was probably trying to use the GCC
> built on Solaris 11 on the SOlaris 10 machine.

Makes sense: Solaris 10 indeed lacks stpcpy, but a native build (which
won't work any longer on trunk) would detect that at configure time.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2022-05-09 11:33 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2022-05-09 12:02 ` cvs-commit at gcc dot gnu.org
  2022-05-09 12:03 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 12:02 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2022-05-09 12:02 ` cvs-commit at gcc dot gnu.org
@ 2022-05-09 12:03 ` redi at gcc dot gnu.org
  2022-06-15  8:15 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-09 12:03 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for all branches where I added that test. If I backport the test to
gcc-10 I'll try to remember to backport this too!

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2022-05-09 12:03 ` redi at gcc dot gnu.org
@ 2022-06-15  8:15 ` cvs-commit at gcc dot gnu.org
  2022-11-23 10:20 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-15  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:6b59f8acada4858f5dd532185a0030cf79163247

commit r10-10841-g6b59f8acada4858f5dd532185a0030cf79163247
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)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2022-06-15  8:15 ` cvs-commit at gcc dot gnu.org
@ 2022-11-23 10:20 ` cvs-commit at gcc dot gnu.org
  2022-12-21 11:37 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-23 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:1cac00d013856fea4cee0f13c4959c8e21afd2d9

commit r13-4262-g1cac00d013856fea4cee0f13c4959c8e21afd2d9
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 22 19:15:53 2022 +0000

    libstdc++: Fix unsafe use of dirent::d_name [PR107814]

    Copy the fix for PR 104731 to the equivalent experimental::filesystem
    test.

    libstdc++-v3/ChangeLog:

            PR libstdc++/107814
            * testsuite/experimental/filesystem/iterators/error_reporting.cc:
            Use a static buffer with space after it.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2022-11-23 10:20 ` cvs-commit at gcc dot gnu.org
@ 2022-12-21 11:37 ` cvs-commit at gcc dot gnu.org
  2022-12-22 11:45 ` cvs-commit at gcc dot gnu.org
  2023-04-27 20:08 ` cvs-commit at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-21 11:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:52daccd82cd71bd065826784ebb6eb04fa9b42af

commit r12-9005-g52daccd82cd71bd065826784ebb6eb04fa9b42af
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 22 19:15:53 2022 +0000

    libstdc++: Fix unsafe use of dirent::d_name [PR107814]

    Copy the fix for PR 104731 to the equivalent experimental::filesystem
    test.

    libstdc++-v3/ChangeLog:

            PR libstdc++/107814
            * testsuite/experimental/filesystem/iterators/error_reporting.cc:
            Use a static buffer with space after it.

    (cherry picked from commit 1cac00d013856fea4cee0f13c4959c8e21afd2d9)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2022-12-21 11:37 ` cvs-commit at gcc dot gnu.org
@ 2022-12-22 11:45 ` cvs-commit at gcc dot gnu.org
  2023-04-27 20:08 ` cvs-commit at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-22 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 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:d176d5b3e734cac0ab1e613c3f1bbe48c0bab81a

commit r11-10434-gd176d5b3e734cac0ab1e613c3f1bbe48c0bab81a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 22 19:15:53 2022 +0000

    libstdc++: Fix unsafe use of dirent::d_name [PR107814]

    Copy the fix for PR 104731 to the equivalent experimental::filesystem
    test.

    libstdc++-v3/ChangeLog:

            PR libstdc++/107814
            * testsuite/experimental/filesystem/iterators/error_reporting.cc:
            Use a static buffer with space after it.

    (cherry picked from commit 1cac00d013856fea4cee0f13c4959c8e21afd2d9)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug libstdc++/104731] 27_io/filesystem/iterators/error_reporting.cc FAILs
  2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2022-12-22 11:45 ` cvs-commit at gcc dot gnu.org
@ 2023-04-27 20:08 ` cvs-commit at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-27 20:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:5d572ffe2e05dbe44edaf19fa10ef2ca3ae8227c

commit r10-11315-g5d572ffe2e05dbe44edaf19fa10ef2ca3ae8227c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 22 19:15:53 2022 +0000

    libstdc++: Fix unsafe use of dirent::d_name [PR107814]

    Copy the fix for PR 104731 to the equivalent experimental::filesystem
    test.

    libstdc++-v3/ChangeLog:

            PR libstdc++/107814
            * testsuite/experimental/filesystem/iterators/error_reporting.cc:
            Use a static buffer with space after it.

    (cherry picked from commit 1cac00d013856fea4cee0f13c4959c8e21afd2d9)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-04-27 20:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 10:40 [Bug libstdc++/104731] New: 27_io/filesystem/iterators/error_reporting.cc FAILs ro at gcc dot gnu.org
2022-03-01 10:41 ` [Bug libstdc++/104731] " ro at gcc dot gnu.org
2022-03-01 12:27 ` redi at gcc dot gnu.org
2022-03-01 12:30 ` redi at gcc dot gnu.org
2022-03-01 12:33 ` redi at gcc dot gnu.org
2022-05-06  8:32 ` jakub at gcc dot gnu.org
2022-05-06 13:52 ` cvs-commit at gcc dot gnu.org
2022-05-06 13:54 ` redi at gcc dot gnu.org
2022-05-09 10:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-05-09 11:27 ` redi at gcc dot gnu.org
2022-05-09 11:29 ` cvs-commit at gcc dot gnu.org
2022-05-09 11:33 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-05-09 12:02 ` cvs-commit at gcc dot gnu.org
2022-05-09 12:03 ` redi at gcc dot gnu.org
2022-06-15  8:15 ` cvs-commit at gcc dot gnu.org
2022-11-23 10:20 ` cvs-commit at gcc dot gnu.org
2022-12-21 11:37 ` cvs-commit at gcc dot gnu.org
2022-12-22 11:45 ` cvs-commit at gcc dot gnu.org
2023-04-27 20:08 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).