[Top][All Lists]

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

[Octave-bug-tracker] [bug #57439] handles to private functions may fail

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #57439] handles to private functions may fail after "clear functions"
Date: Tue, 10 Mar 2020 14:07:15 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #45, bug #57439 (project octave):

I think the problem is not reloading but simply the addition of the following
lines leads to a massive increase in the number of times that the stat
function is called to check for a private function:

diff --git a/libinterp/corefcn/load-path.cc b/libinterp/corefcn/load-path.cc
--- a/libinterp/corefcn/load-path.cc
+++ b/libinterp/corefcn/load-path.cc
@@ -1675,6 +1716,8 @@
               retval = fname;
+    else
+      retval = find_private_fcn_file (canon_dir, fcn, type);
     return retval;

I can think of other ways to deal with function handles that reference deleted
functions, but I need to make sure that the solution we choose is compatible
with Matlab behavior.  I'll try to come up with some tests and ask for help on
the maintainers list.

This issue also brings up the question of whether there is a better way to
check for the existence of a file other than calling stat.  The gnulib wrapper
for that function seems to be particularly slow on Windows systems.  I many
cases, we don't need all the information it returns.


Reply to this item at:


  Message sent via Savannah

reply via email to

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