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

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

[Octave-bug-tracker] [bug #55254] clear all crashes when variable from o


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55254] clear all crashes when variable from oct file class is displayed in workspace
Date: Thu, 17 Jan 2019 12:55:32 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #15, bug #55254 (project octave):

Rik: That's fine as we can avoid the crash unless people go out of their way
to make it happen by using munlock.

John D: Yes, a partial fix in that it is not automatic and it will require
fixing any .oct files that define new octave_value data types.

However, I'm not sure what to do for a better fix.  It is possible to get the
current shared library object from inside a DEFMETHOD_DLD function using
something like this:


  octave::call_stack& cs = interp.get_call_stack ();

  octave_function *cf = cs.current ();

  octave_dld_function *this_fcn = dynamic_cast<octave_dld_function *> (cf);

  octave::dynamic_library dyn_lib = this_fcn->get_shlib ();


>From there, it would be possible to set up an association between the shared
library object and any new octave_value types that are created so that the
shared library may only be unloaded when all functions and value objects that
it defines are cleared.  This job is already done for the functions but not
the values.  But this seems messy and would require defining the octave_value
so that they count all instantiated values.  A change like this is possible,
but would add some overhead and make dynamically loaded octave_value types
different from the octave_value objects defined in core Octave.

Maybe it would be better to just add a symbol to .oct files that define new
octave_value data types to declare that they may not be unloaded?  That's a
very simple change for developers to make and imposes very low overhead for
Octave (a one-time cost when loading the .oct file).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55254>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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