public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fdumont at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/54296] using the object in the map to erase element from the map crashes
Date: Wed, 05 Sep 2012 19:41:00 -0000	[thread overview]
Message-ID: <bug-54296-4-eSGo84m7XQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54296-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54296

--- Comment #9 from François Dumont <fdumont at gcc dot gnu.org> 2012-09-05 19:41:21 UTC ---
Author: fdumont
Date: Wed Sep  5 19:41:16 2012
New Revision: 190991

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190991
Log:
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.

Added:
    trunk/libstdc++-v3/testsuite/23_containers/unordered_map/erase/54276.cc
   
trunk/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/54276.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/hashtable.h


  parent reply	other threads:[~2012-09-05 19:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 13:08 [Bug libstdc++/54296] New: " plasmahh at gmx dot net
2012-08-17 13:17 ` [Bug libstdc++/54296] " redi at gcc dot gnu.org
2012-08-26 10:56 ` fdumont at gcc dot gnu.org
2012-08-26 12:31 ` paolo.carlini at oracle dot com
2012-08-26 12:38 ` paolo.carlini at oracle dot com
2012-08-26 12:41 ` paolo.carlini at oracle dot com
2012-08-26 23:07 ` paolo.carlini at oracle dot com
2012-08-26 23:16 ` paolo.carlini at oracle dot com
2012-08-26 23:21 ` paolo.carlini at oracle dot com
2012-08-27  7:59 ` fdumont at gcc dot gnu.org
2012-08-27  9:36 ` paolo.carlini at oracle dot com
2012-09-05 19:41 ` fdumont at gcc dot gnu.org [this message]
2012-09-07  9:34 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-54296-4-eSGo84m7XQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).