public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/105957] New: __n * sizeof(_Tp) might overflow under consteval context for std::allocator
@ 2022-06-13 19:10 unlvsur at live dot com
  2022-06-14  9:32 ` [Bug libstdc++/105957] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-06-13 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105957
           Summary: __n * sizeof(_Tp) might overflow under consteval
                    context for std::allocator
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

https://github.com/gcc-mirror/gcc/blob/b3dd7d8b48227d3489039ca66b6c0ea2da743255/libstdc%2B%2B-v3/include/bits/allocator.h#L187

__n * sizeof(_Tp) can overflow under consteval context. Need checks i believe.
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));

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

end of thread, other threads:[~2022-08-03 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 19:10 [Bug libstdc++/105957] New: __n * sizeof(_Tp) might overflow under consteval context for std::allocator unlvsur at live dot com
2022-06-14  9:32 ` [Bug libstdc++/105957] " redi at gcc dot gnu.org
2022-06-14 20:19 ` cvs-commit at gcc dot gnu.org
2022-06-14 20:20 ` redi at gcc dot gnu.org
2022-08-03 13:46 ` cvs-commit at gcc dot gnu.org
2022-08-03 13:49 ` 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).