This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: core dumped when adding to vector


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


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