octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47372] Memory leaks and segmentation faults i


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #47372] Memory leaks and segmentation faults in Octave
Date: Wed, 30 Mar 2016 21:58:12 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0

Follow-up Comment #67, bug #47372 (project octave):

OK, I think I have a solution.

Yes, it seems that to export the static data, it needs to be a data member,
not just a static variable in a member function.  If it is a static data
member and the class is exported, then the data member will also be exported.

Then the other problem was that in addition to Array-d.cc (where Array<double>
is explicitly instantiated) we were also getting implicit instantiations in
ov-classdef.cc and Array-tc.cc.  Apparently there were Array<double> values
referenced in those files and since the complete class definition was
available the compiler did its thing and instantiated an instance of
Array<double>.

Fixing these problems so that only a single instance of Array<double> is
present seems to fix the problem, but I'm sure we have other similar cases to
fix.  A few will be easy to find because they follow a similar pattern to
this.  But for others I'm guesing it will be a little more difficult.  Maybe
we could look at the output of nm on the .o files for Windows and find where
data objects are defined more than once and start with those?  I'm not sure.

I'll check in a changeset soon.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47372>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]