[v3] libstdc++/54296
François Dumont
frs.dumont@gmail.com
Wed Sep 5 19:52:00 GMT 2012
On 09/05/2012 11:58 AM, Paolo Carlini wrote:
> Hi,
>
> On 09/04/2012 10:08 PM, François Dumont wrote:
>> Hi
>>
>> I managed to do the test with Valgrind and so confirm the fix
>> with the attached patch (unmodified since last proposal).
> Patch is Ok, thanks for your patience and thanks again for all your
> great work on the unordered containers!
>
> Paolo.
>
Attached patch applied. No problem Paolo, this is your job as
maintainers to challenge the patches, no big deal. And being now able to
run programs through Valgrind or Gdb is definitely more comfortable for me.
2012-09-05 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/54296
* include/bits/hashtable.h (_M_erase(size_type, __node_base*,
__node_type*)): New.
(erase(const_iterator)): Use latter.
(_M_erase(std::true_type, const key_type&)): New, likewise.
(_M_erase(std::false_type, const key_type&)): New. Find all nodes
matching the key before deallocating them so that the key doesn't
get invalidated.
(erase(const key_type&)): Use the new member functions.
* testsuite/23_containers/unordered_map/erase/54296.cc: New.
* testsuite/23_containers/unordered_multimap/erase/54296.cc: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hashtable.patch
Type: text/x-patch
Size: 10683 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20120905/c92a9a89/attachment.bin>
More information about the Libstdc++
mailing list