PR libstdc++/81891 fix double-free in hashtable constructor
authorJonathan Wakely <jwakely@redhat.com>
Fri, 18 Aug 2017 17:46:57 +0000 (18:46 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 18 Aug 2017 17:46:57 +0000 (18:46 +0100)
commit676c4146f504d5252df1a3fb39bb5c4099bc0791
treedfbe1a715b12079e6ed0e120937397676b8ccd3a
parent419d55e8df26ba17ee7514fa40669490d387d2c4
PR libstdc++/81891 fix double-free in hashtable constructor

PR libstdc++/81891
* include/bits/hashtable.h (_Hashtable(_InputIterator, _InputIterator,
size_type, const _H1&, const _H2&, const _Hash&, const _Equal&,
const _ExtractKey&, const allocator_type&)): Let destructor do clean
up if an exception is thrown.
* testsuite/23_containers/unordered_map/cons/81891.cc: New.

From-SVN: r251185
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc [new file with mode: 0644]