This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/54296] using the object in the map to erase element from the map crashes


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

--- Comment #7 from FranÃois Dumont <fdumont at gcc dot gnu.org> 2012-08-27 07:58:49 UTC ---
I confirm that it is an old issue, it has surely always be there. I managed to
reproduce it from the testsuite. The problem is that the current code works
fine when the key instance is taken from the container keys but doesn't work
when it is extracted from the container values.

The current address check is not reliable because the passed key instance could
be anywhere within the mapped value. I am preparing a patch to separate the
loop used to find the nodes to erase from the loop used to deallocate them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]