octave-maintainers
[Top][All Lists]
Advanced

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

Re: Weird behavior with mislocked: oct-file is unloaded while checking l


From: John W. Eaton
Subject: Re: Weird behavior with mislocked: oct-file is unloaded while checking lock state...
Date: Wed, 03 Sep 2008 11:23:33 -0400

On  3-Sep-2008, Michael Goffioul wrote:

| On Tue, Sep 2, 2008 at 9:13 PM, John W. Eaton <address@hidden> wrote:
| > | I'm a little bit confused about this. John, could you give me a hint?
| >
| > Probably there should be a check here to ensure that FUNCTION is not
| > locked, and not clear it if it is locked.
| 
| Shouldn't this be a problem for any oct-file with internal static variables?
| Is such oct-file always supposed to lock itself? In the end, why is the
| oct-file reloaded, as no modification has been made to it?

The function shouldn't be invalidated unless the time stamp changes or
it is no longer visible.  Does the following change fix that problem?
I'm still not sure this is completely the correct thing to do, but I
think it will avoid the problem you are seeing.

Thanks,

jwe


# HG changeset patch
# User John W. Eaton <address@hidden>
# Date 1220455225 14400
# Node ID 163d20e4d39c450943e56e3b366ce671e384c232
# Parent  b1634dd9ebe7a21c78ed9cf2341d81a9efbef569
symtab.cc (out_of_date_check_internal): check for method, then regular function

diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-03  John W. Eaton  <address@hidden>
+
+       * symtab.cc (out_of_date_check_internal): If dispatch type is set,
+       check for method.  If that fails, check for regular function. 
+
 2008-09-02  Michael Goffioul  <address@hidden>
 
        * graphics.cc (hggroup::update_axis_limits): Also reacts on
diff --git a/src/symtab.cc b/src/symtab.cc
--- a/src/symtab.cc
+++ b/src/symtab.cc
@@ -193,11 +193,12 @@
                      // because load_fcn_file looks at the name to
                      // decide whether it came from a relative lookup.
 
-                     if (dispatch_type.empty ())
-                       file = load_path::find_fcn (nm, dir_name);
-                     else
+                     if (! dispatch_type.empty ())
                        file = load_path::find_method (nm, dispatch_type,
                                                       dir_name);
+
+                     if (file.empty ())
+                       file = load_path::find_fcn (nm, dir_name);
                    }
 
                  if (file.empty ())

reply via email to

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