public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
@ 2023-07-17 20:46 redi at gcc dot gnu.org
  2023-07-17 20:47 ` [Bug libstdc++/110708] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-17 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110708
           Summary: std::format("{:%EEC %OOd}",
                    std::chrono::system_clock::now()) should be rejected
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

A chrono format string should only allow a single E or O modifier for each
flag.

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

* [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
  2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
@ 2023-07-17 20:47 ` redi at gcc dot gnu.org
  2023-07-18 11:28 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-17 20:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
   Last reconfirmed|                            |2023-07-17
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

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

* [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
  2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
  2023-07-17 20:47 ` [Bug libstdc++/110708] " redi at gcc dot gnu.org
@ 2023-07-18 11:28 ` redi at gcc dot gnu.org
  2023-07-19 10:11 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-18 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And similarly for %OEy and %EOy

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

* [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
  2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
  2023-07-17 20:47 ` [Bug libstdc++/110708] " redi at gcc dot gnu.org
  2023-07-18 11:28 ` redi at gcc dot gnu.org
@ 2023-07-19 10:11 ` cvs-commit at gcc dot gnu.org
  2023-07-19 10:13 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-19 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:52bfec7ea0eb0f1a4c5bfa55b0d6b9b6c8808e26

commit r14-2638-g52bfec7ea0eb0f1a4c5bfa55b0d6b9b6c8808e26
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jul 18 10:36:37 2023 +0100

    libstdc++: Check for multiple modifiers in chrono format string [PR110708]

    The logic for handling modified chrono specs like %Ey was just
    restarting the loop after each modifier, and not checking whether we'd
    already seen a modifier.

    libstdc++-v3/ChangeLog:

            PR libstdc++/110708
            * include/bits/chrono_io.h (__formatter_chrono::_M_parse): Only
            allow a single modifier.
            * testsuite/std/time/format.cc: Check multiple modifiers.

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

* [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
  2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-07-19 10:11 ` cvs-commit at gcc dot gnu.org
@ 2023-07-19 10:13 ` redi at gcc dot gnu.org
  2023-07-28 17:32 ` cvs-commit at gcc dot gnu.org
  2023-07-28 19:00 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-19 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.3

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk, the backport can wait until after the upcoming 13.2 release.

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

* [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
  2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-07-19 10:13 ` redi at gcc dot gnu.org
@ 2023-07-28 17:32 ` cvs-commit at gcc dot gnu.org
  2023-07-28 19:00 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-28 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:74f1c016f44daf18e4bed76b283cd5bfd0b5c8c7

commit r13-7629-g74f1c016f44daf18e4bed76b283cd5bfd0b5c8c7
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jul 18 10:36:37 2023 +0100

    libstdc++: Check for multiple modifiers in chrono format string [PR110708]

    The logic for handling modified chrono specs like %Ey was just
    restarting the loop after each modifier, and not checking whether we'd
    already seen a modifier.

    libstdc++-v3/ChangeLog:

            PR libstdc++/110708
            * include/bits/chrono_io.h (__formatter_chrono::_M_parse): Only
            allow a single modifier.
            * testsuite/std/time/format.cc: Check multiple modifiers.

    (cherry picked from commit 52bfec7ea0eb0f1a4c5bfa55b0d6b9b6c8808e26)

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

* [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected
  2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-07-28 17:32 ` cvs-commit at gcc dot gnu.org
@ 2023-07-28 19:00 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-28 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

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 13.3

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

end of thread, other threads:[~2023-07-28 19:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 20:46 [Bug libstdc++/110708] New: std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected redi at gcc dot gnu.org
2023-07-17 20:47 ` [Bug libstdc++/110708] " redi at gcc dot gnu.org
2023-07-18 11:28 ` redi at gcc dot gnu.org
2023-07-19 10:11 ` cvs-commit at gcc dot gnu.org
2023-07-19 10:13 ` redi at gcc dot gnu.org
2023-07-28 17:32 ` cvs-commit at gcc dot gnu.org
2023-07-28 19: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).