public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase
@ 2011-05-19 11:42 dtardon at redhat dot com
2011-05-19 11:50 ` [Bug libstdc++/49060] " dtardon at redhat dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dtardon at redhat dot com @ 2011-05-19 11:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
Summary: use of deleted memory in __gnu_cxx::hashtable::erase
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dtardon@redhat.com
Created attachment 24289
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24289
reproducer
How to reproduce:
1. get the attached reproducer
2. g++ -Wall -g -O0 hashtable.cc -o hashtable
3. valgrind ./hashtable
Note:
I think this cannot be triggered through normal use of std::hash_map or
std::hash_set, because it requires that the bucket contains two nodes with
equal key.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/49060] use of deleted memory in __gnu_cxx::hashtable::erase
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
@ 2011-05-19 11:50 ` dtardon at redhat dot com
2011-05-19 12:22 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dtardon at redhat dot com @ 2011-05-19 11:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
--- Comment #1 from David Tardon <dtardon at redhat dot com> 2011-05-19 11:26:42 UTC ---
Created attachment 24290
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24290
patch
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/49060] use of deleted memory in __gnu_cxx::hashtable::erase
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
2011-05-19 11:50 ` [Bug libstdc++/49060] " dtardon at redhat dot com
@ 2011-05-19 12:22 ` paolo.carlini at oracle dot com
2011-05-19 12:30 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-19 12:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-19 12:04:27 UTC ---
Personally I consider this legacy code essentially frozen, and don't mean to
spend time on it barring serious regressions. If Ian can review the patch and
approve it, I don't object, though.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/49060] use of deleted memory in __gnu_cxx::hashtable::erase
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
2011-05-19 11:50 ` [Bug libstdc++/49060] " dtardon at redhat dot com
2011-05-19 12:22 ` paolo.carlini at oracle dot com
@ 2011-05-19 12:30 ` redi at gcc dot gnu.org
2011-05-19 12:40 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-05-19 12:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.05.19 12:03:35
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/49060] use of deleted memory in __gnu_cxx::hashtable::erase
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
` (2 preceding siblings ...)
2011-05-19 12:30 ` redi at gcc dot gnu.org
@ 2011-05-19 12:40 ` paolo.carlini at oracle dot com
2011-05-25 23:10 ` ian at gcc dot gnu.org
2011-05-26 1:20 ` ian at airs dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-19 12:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |iant at google dot com
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-19 12:15:10 UTC ---
CC-ing Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/49060] use of deleted memory in __gnu_cxx::hashtable::erase
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
` (3 preceding siblings ...)
2011-05-19 12:40 ` paolo.carlini at oracle dot com
@ 2011-05-25 23:10 ` ian at gcc dot gnu.org
2011-05-26 1:20 ` ian at airs dot com
5 siblings, 0 replies; 7+ messages in thread
From: ian at gcc dot gnu.org @ 2011-05-25 23:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
--- Comment #4 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2011-05-25 23:09:20 UTC ---
Author: ian
Date: Wed May 25 23:09:14 2011
New Revision: 174240
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174240
Log:
PR libstdc++/49060
* include/backward/hashtable.h (hashtable::erase): Don't crash if
erasing first and another element with a reference to the other
element.
* testsuite/backward/hash_set/49060.cc: New.
Added:
trunk/libstdc++-v3/testsuite/backward/hash_set/49060.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/backward/hashtable.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/49060] use of deleted memory in __gnu_cxx::hashtable::erase
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
` (4 preceding siblings ...)
2011-05-25 23:10 ` ian at gcc dot gnu.org
@ 2011-05-26 1:20 ` ian at airs dot com
5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2011-05-26 1:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49060
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |ian at airs dot com
Resolution| |FIXED
--- Comment #5 from Ian Lance Taylor <ian at airs dot com> 2011-05-25 23:09:37 UTC ---
Fixed. Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-05-25 23:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 11:42 [Bug libstdc++/49060] New: use of deleted memory in __gnu_cxx::hashtable::erase dtardon at redhat dot com
2011-05-19 11:50 ` [Bug libstdc++/49060] " dtardon at redhat dot com
2011-05-19 12:22 ` paolo.carlini at oracle dot com
2011-05-19 12:30 ` redi at gcc dot gnu.org
2011-05-19 12:40 ` paolo.carlini at oracle dot com
2011-05-25 23:10 ` ian at gcc dot gnu.org
2011-05-26 1:20 ` ian at airs dot com
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).