diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-08-16 12:33:16 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-08-16 12:33:16 +0100 |
commit | 32917686b0ebb596fe0d783328a771c4dfd759ef (patch) | |
tree | bef37ad2a61004e130733c3790b8c0f4d450509c /gcc/testsuite/gcc.dg | |
parent | f4eec0a3e34cd709476b5062e44ef0075c75f426 (diff) | |
download | gcc-32917686b0ebb596fe0d783328a771c4dfd759ef.zip gcc-32917686b0ebb596fe0d783328a771c4dfd759ef.tar.gz gcc-32917686b0ebb596fe0d783328a771c4dfd759ef.tar.bz2 |
PR 72847 Prevent double-free in std::vector<bool>
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
Diffstat (limited to 'gcc/testsuite/gcc.dg')
0 files changed, 0 insertions, 0 deletions