[Bug libstdc++/94906] memory corruption in std::pmr::memory_buffer_resource

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri May 1 18:46:36 GMT 2020


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Better would be:
size_t __size = (((size_t)1) << __ch->_M_size);

As long could be 32bits (windows)


More information about the Gcc-bugs mailing list