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: chris jefferson <caj at cs dot york dot ac dot uk>
- To: Anakreon <anakreonmejdi at yahoo dot gr>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 24 Jun 2005 16:16:32 +0100
- Subject: Re: core dumped when adding to vector
- References: <d9h3qn$osr$1@sea.gmane.org>
Anakreon wrote:
I hope this is the correct mailing list to make such questions.
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.
I can't figure out why and how can this happen.
The problem arises to the allocatetor according to gdb but the first
vector
has less then 5 elements so is impossible for the memory to be exhausted.
If this mailing list is the right place for such questions I can send
the offending
code (less then 5 lines) and the output of gdb when backtrace is invoked.
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