public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path
@ 2020-09-22 18:42 redi at gcc dot gnu.org
  2020-09-22 18:43 ` [Bug libstdc++/97167] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-09-22 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97167
           Summary: [9/10/11 Regression] string_view bounds error in
                    filesystem::path
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

This segfaults since 9.1.0:

#include <filesystem>

int main()
{
  std::filesystem::path p;
  std::string_view s;
  p /= s;
}

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

* [Bug libstdc++/97167] [9/10/11 Regression] string_view bounds error in filesystem::path
  2020-09-22 18:42 [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path redi at gcc dot gnu.org
@ 2020-09-22 18:43 ` redi at gcc dot gnu.org
  2020-09-22 19:04 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-09-22 18:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |8.4.0
   Last reconfirmed|                            |2020-09-22
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |10.2.0, 11.0, 9.3.0
   Target Milestone|---                         |9.4

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I have a patch

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

* [Bug libstdc++/97167] [9/10/11 Regression] string_view bounds error in filesystem::path
  2020-09-22 18:42 [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path redi at gcc dot gnu.org
  2020-09-22 18:43 ` [Bug libstdc++/97167] " redi at gcc dot gnu.org
@ 2020-09-22 19:04 ` cvs-commit at gcc dot gnu.org
  2020-09-22 19:34 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-22 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:49ff88bd0d8a36a9e903f01ce05685cfe07dee5d

commit r11-3367-g49ff88bd0d8a36a9e903f01ce05685cfe07dee5d
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Sep 22 20:02:58 2020 +0100

    libstdc++: Fix out-of-bounds string_view access in filesystem::path [PR
97167]

    libstdc++-v3/ChangeLog:

            PR libstdc++/97167
            * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
            for empty string before inspecting the first character.
            * testsuite/27_io/filesystem/path/append/source.cc: Append
            empty string_view to path.

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

* [Bug libstdc++/97167] [9/10/11 Regression] string_view bounds error in filesystem::path
  2020-09-22 18:42 [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path redi at gcc dot gnu.org
  2020-09-22 18:43 ` [Bug libstdc++/97167] " redi at gcc dot gnu.org
  2020-09-22 19:04 ` cvs-commit at gcc dot gnu.org
@ 2020-09-22 19:34 ` cvs-commit at gcc dot gnu.org
  2020-09-22 19:59 ` cvs-commit at gcc dot gnu.org
  2020-09-22 20:00 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-22 19:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:ebf259b243069e77dc7199072304b455e8fcb865

commit r10-8789-gebf259b243069e77dc7199072304b455e8fcb865
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Sep 22 20:02:58 2020 +0100

    libstdc++: Fix out-of-bounds string_view access in filesystem::path [PR
97167]

    libstdc++-v3/ChangeLog:

            PR libstdc++/97167
            * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
            for empty string before inspecting the first character.
            * testsuite/27_io/filesystem/path/append/source.cc: Append
            empty string_view to path.

    (cherry picked from commit 49ff88bd0d8a36a9e903f01ce05685cfe07dee5d)

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

* [Bug libstdc++/97167] [9/10/11 Regression] string_view bounds error in filesystem::path
  2020-09-22 18:42 [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path redi at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-09-22 19:34 ` cvs-commit at gcc dot gnu.org
@ 2020-09-22 19:59 ` cvs-commit at gcc dot gnu.org
  2020-09-22 20:00 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-22 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r9-8932-ge7285587186bac5692171d7493e29e16c729281d
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Sep 22 20:02:58 2020 +0100

    libstdc++: Fix out-of-bounds string_view access in filesystem::path [PR
97167]

    libstdc++-v3/ChangeLog:

            PR libstdc++/97167
            * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
            for empty string before inspecting the first character.
            * testsuite/27_io/filesystem/path/append/source.cc: Append
            empty string_view to path.

    (cherry picked from commit 49ff88bd0d8a36a9e903f01ce05685cfe07dee5d)

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

* [Bug libstdc++/97167] [9/10/11 Regression] string_view bounds error in filesystem::path
  2020-09-22 18:42 [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path redi at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-09-22 19:59 ` cvs-commit at gcc dot gnu.org
@ 2020-09-22 20:00 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-09-22 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 9.4 and 10.3

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

end of thread, other threads:[~2020-09-22 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 18:42 [Bug libstdc++/97167] New: [9/10/11 Regression] string_view bounds error in filesystem::path redi at gcc dot gnu.org
2020-09-22 18:43 ` [Bug libstdc++/97167] " redi at gcc dot gnu.org
2020-09-22 19:04 ` cvs-commit at gcc dot gnu.org
2020-09-22 19:34 ` cvs-commit at gcc dot gnu.org
2020-09-22 19:59 ` cvs-commit at gcc dot gnu.org
2020-09-22 20:00 ` redi 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).