octave-maintainers
[Top][All Lists]
Advanced

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

Re: thoughts about unwind_protect


From: Marco Atzeri
Subject: Re: thoughts about unwind_protect
Date: Thu, 7 Jan 2010 18:03:52 +0000 (GMT)

--- Gio 7/1/10, Jaroslav Hajek  ha scritto:

> 
> First rule out any package involvement (I suppose you
> already did).
> Try ./run-octave -f. Then, if nothing works,
> go to symbol_table::cleanup and start commenting out *from
> backwards*
> the individual cleanup actions, until the problem
> vanishes.



It vanishes on fcn_table.clear .
Starting from the bottom I almost hit the top ;-(

void symbol_table::cleanup (void)
{
  // Clear variables in top scope.
  all_instances[xtop_scope]->clear_variables ();

/* DISABLED
  // Clear function table. This is a hard clear, ignoring mlocked functions.
  fcn_table.clear ();

  // Clear variables in global scope.
  // FIXME: are there any?
  all_instances[xglobal_scope]->clear_variables ();

  // Clear global variables.
  global_table.clear ();

  // Delete all possibly remaining scopes.
  for (all_instances_iterator iter = all_instances.begin ();
       iter != all_instances.end (); iter++)
    {
      scope_id scope = iter->first;
      if (scope != xglobal_scope && scope != xtop_scope)
        scope_id_cache::free (scope);

      // First zero the table entry to avoid possible duplicate delete.
      symbol_table *inst = iter->second;
      iter->second = 0;

      // Now delete the scope. Note that there may be side effects, such as
      // deleting other scopes.
      delete inst;
    }
*/
}


> hth
> -- 
> RNDr. Jaroslav Hajek, PhD
> 

next step ?
Marco



      




reply via email to

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