stl_bvector.h
32.8 KB
-
PR 72847 Prevent double-free in std::vector<bool> · 32917686
PR libstdc++/72847 * include/bits/stl_bvector.h (_Bvector_base::_M_deallocate): Zero pointers to start and end of storage. * testsuite/23_containers/vector/bool/72847.cc: New test. * include/bits/vector.tcc (vector<bool>::_M_reallocate): Only update _M_finish after deallocating. (vector<bool>::_M_fill_insert): Likewise. (vector<bool>::_M_insert_range): Likewise. (vector<bool>::_M_insert_aux): Likewise. From-SVN: r239497
Jonathan Wakely committed