public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/110968] New: format out of bounds read on format("{:05L}",-1.f)
@ 2023-08-10  8:17 gcc at pauldreik dot se
  2023-08-10  9:10 ` [Bug libstdc++/110968] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gcc at pauldreik dot se @ 2023-08-10  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110968
           Summary: format out of bounds read on format("{:05L}",-1.f)
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at pauldreik dot se
  Target Milestone: ---

The following program:

#include <cstdio>
#include <format>

int main() {
    float v = -1;
    std::puts(std::vformat("{:05L}", std::make_format_args(v)).c_str());
}

generates an out of bounds read when compiled with gcc 13.2 (and current trunk,
as of 2023-08-10).

Link to reproducer: https://godbolt.org/z/PjeTsK89E

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

end of thread, other threads:[~2023-08-11  0:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10  8:17 [Bug libstdc++/110968] New: format out of bounds read on format("{:05L}",-1.f) gcc at pauldreik dot se
2023-08-10  9:10 ` [Bug libstdc++/110968] " redi at gcc dot gnu.org
2023-08-10 13:18 ` redi at gcc dot gnu.org
2023-08-10 13:19 ` redi at gcc dot gnu.org
2023-08-10 22:32 ` cvs-commit at gcc dot gnu.org
2023-08-11  0:03 ` cvs-commit at gcc dot gnu.org
2023-08-11  0:07 ` 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).