bugGNU Octave - Bugs: bug #35067, Symbol table incorrect after clear...

 
 

bug #35067: Symbol table incorrect after clear -f and DLD function reload

Submitter:  Rik <rik5>
Submitted:  Wed 14 Dec 2011 06:52:48 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 12 Sep 2015 03:13:12 PM UTC, comment #3: 

This now seems to be fixed, possibly by this recent cset:

http://hg.savannah.gnu.org/hgweb/octave/rev/c36f06ef7539

Mike Miller <mtmiller>
Group Member
Fri 22 May 2015 03:59:26 PM UTC, comment #2: 

Bug is still present, but urlread has also become a core function.  Updated to use chol.cc to show the problem.


octave:1> chol2inv (rand (3));
## Hit Ctrl-Z to suspend Octave and return to shell prompt.
## sh> touch libinterp/dldfcn/chol.cc
## sh> make
## This updates the timestamp on chol.oct
## Now resume Octave
## sh> fg
octave:2> clear -f chol2inv
octave:3> chol2inv
error: Invalid call to chol.  Correct usage is:

 -- Loadable Function: R = chol (A)
 -- Loadable Function: [R, P] = chol (A)
 -- Loadable Function: [R, P, Q] = chol (S)
 -- Loadable Function: [R, P, Q] = chol (S, "vector")
 -- Loadable Function: [L, ...] = chol (..., "lower")
 -- Loadable Function: [L, ...] = chol (..., "upper")



Rik <rik5>
Group administrator
Thu 05 Sep 2013 01:55:43 AM UTC, comment #1: 

Confirmed still present with the development version of Octave. Updated to use urlread since time.cc is now a built-in.


sh> ./run-octave
octave:1> s1 = urlread ("http://www.gnu.org/");
Hit Ctrl-Z to suspend Octave and return to shell prompt.
sh> touch ../libinterp/dldfcn/urlwrite.cc
sh> make
## This updates the timestamp on time.oct
## Now resume Octave
sh> fg
octave:2> clear -f urlread
octave:3> s2 = urlread ("http://www.gnu.org/");
error: Invalid call to urlwrite.  Correct usage is:

 -- Loadable Function: urlwrite (URL, LOCALFILE)
[...]
octave:4> clear -f
## Now urlread works correctly again
octave:5> s2 = urlread ("http://www.gnu.org/");


Mike Miller <mtmiller>
Group Member
Wed 14 Dec 2011 06:52:48 AM UTC, original submission:  

This is obscure, but I thought I would report it.  The following sequence of commands, which is designed to trigger a warning about reloading functions, corrupts the symbol table.


sh> ./run-octave
octave:1> x = localtime (100);
Hit Ctrl-Z to suspend Octave and return to shell prompt.
sh> touch src/DLD-FUNCTIONS/time.cc
sh> make
## This updates the timestamp on time.oct
## Now resume Octave
sh> fg
octave:2> clear -f localtime
octave:3> y = localtime (200);
error: Invalid call to time.  Correct usage is:

 -- Loadable Function: SECONDS = time ()
octave:4> help localtime
`localtime' is a function from the file /home/rik/wip/Projects_Mine/octave-doc/src/DLD-FUNCTIONS/time.oct

 -- Loadable Function: SECONDS = time ()
     Return the current time as the number of seconds since the epoch.
     The epoch is referenced to 00:00:00 CUT (Coordinated Universal
     Time) 1 Jan 1970.  For example, on Monday February 17, 1997 at
     07:15:06 CUT, the value returned by `time' was 856163706.

     See also: strftime, strptime, localtime, gmtime, mktime, now,
     date, clock, datenum, datestr, datevec, calendar, weekday


As you can see, localtime becomes aliased to the function with the same name as the .oct file.

Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-12 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-09-05 mtmiller CategoryLibraries Interpreter
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code