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

--- Comment #8 from bredelin at ucla dot edu 2010-10-08 15:58:49 UTC ---
When you say segfault, I presume you mean abort?

When I use the debugger, the problem appears to be in the call to

 new Parameters(*P);

On x86_64, the problem occurs as follows: (x86_32 is different)

In the copy constructor, Parameters::SuperModel2 is constructed OK.

Then the copy constructor for Parameters::Probability_Model is called,
which calls the copy constructor for Probability_Model::Model2, which
calls the copy constructor for Model2::vector<double>.

In the (synthesized) copy constructor
   vector<double>::vector<double>(const vector<double>& __x),
the debugger claims that "this" and "__x" are both optimized out, and won't let
me inspect anything.

The SIGABORT actually occurs because the __x has a __x.size() of
18446726482060379005. It should have a size of 0.
(I can't call __x.size(), but I can access __n, which is initialized from
__x.size()).

Reply via email to