This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: core dumped when adding to vector
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: chris jefferson <caj at cs dot york dot ac dot uk>
- Cc: Anakreon <anakreonmejdi at yahoo dot gr>, libstdc++ at gcc dot gnu dot org
- Date: Fri, 24 Jun 2005 09:24:50 -0700
- Subject: Re: core dumped when adding to vector
- References: <d9h3qn$osr$1@sea.gmane.org> <42BC23D0.50704@cs.york.ac.uk>
> >I have an enum called protocol_states and a vector<protocol_state>
> >which contains
> >some elements. When I call the insert method of an other empty
> >vector<protocol_state>
> >in order to copy the elements of the first vector, a core dumped occurs.
On Fri, Jun 24, 2005 at 04:16:32PM +0100, chris jefferson wrote:
> The best place to submit bug reports is to http://gcc.gnu.org/bugzilla/.
> If you submit it there, someone will come along and tell you if it is a
> bug in libstdc++ or a bug in your code.
Chris, why are you assuming that there's a bug in GCC or libstdc++?
Vectors of enums are trivial and just work for everyone else.
I suspect that there is some other bug in the program, one that corrupts
the heap. This is particularly likely if the allocator is dumping core.