[Bug libstdc++/100153] Undefined behavior in stl_bvector.h
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 20 15:05:40 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100153
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-04-20
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think the bug is that vector<bool>::shrink_to_fit() always allocates, even if
the new capacity is zero.
It should set _M_start._M_p == _M_end_of_storage == nullptr
More information about the Gcc-bugs
mailing list