octave-maintainers
[Top][All Lists]
Advanced

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

Re: "clear all" problem for classes defined in oct-files (Was: : bug) (C


From: Michael Goffioul
Subject: Re: "clear all" problem for classes defined in oct-files (Was: : bug) (Concerns: SWIG)
Date: Thu, 12 Jun 2008 07:13:14 +0200

On Wed, Jun 11, 2008 at 11:17 PM, John W. Eaton <address@hidden> 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.


reply via email to

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