"clear all" problem for classes defined in oct-files (Was: : bug) (Concerns: SWIG)
Michael Goffioul
michael.goffioul at gmail.com
Thu Jun 12 00:13:14 CDT 2008
On Wed, Jun 11, 2008 at 11:17 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> | This works for DLD functions, but not for DLD classes. What I propose is to
> | extend this behavior to DLD classes, either on a per-class basis (every
> | DLD class must take care itself of the octave_shlib referencing) or through
> | an octave-provided mechanism (for instance in the form of an octave_dld_value
> | class).
>
> I guess I'm not following what you mean by a "DLD class".
I mean an octave_base_value-derived class that is defined in an
oct-file and registered when the oct-file is loaded by octave. Several
packages use this technique: fixed, communications, java, SWIG...
The problem is that the virtual table of objects from such class
points to code that is located in the oct-file. If the oct-file is
unloaded while such objects still exist, their virtual table then
points to invalid code segment, leading to segfault in the end.
Michael.
More information about the Octave-maintainers
mailing list