]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/81891 fix double-free in hashtable constructor
authorJonathan Wakely <jwakely@redhat.com>
Mon, 4 Sep 2017 16:41:34 +0000 (17:41 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 4 Sep 2017 16:41:34 +0000 (17:41 +0100)
commit3495af3f697b552eed2f622ad18bf1a8447d6b09
treef9c5ce4cb5a28846dd9970a92e544281bc4ddf32
parentda5667f12acacc3ea7792c86fd4d0d0530e1e6a1
PR libstdc++/81891 fix double-free in hashtable constructor

Backport from mainline
2017-08-18  Jonathan Wakely  <jwakely@redhat.com>

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: r251671
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc [new file with mode: 0644]