[Bug c++/52967] Segmentation fault on std::vector destruction

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 13 09:52:00 GMT 2012


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-13 09:52:03 UTC ---
Yes, this is invalid.  If you want to do this then you need to call reserve on
the vector so that push_back doesn't cause reallocation (or decide if the code
shouldn't just be rewritten differently!)



More information about the Gcc-bugs mailing list