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)));