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

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

[Octave-bug-tracker] [bug #36025] error in caching of class fuctions dep


From: jan pfaler
Subject: [Octave-bug-tracker] [bug #36025] error in caching of class fuctions depending on header line
Date: Wed, 28 Mar 2012 16:40:51 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.15 (KHTML, like Gecko) Ubuntu/11.04 Chromium/18.0.997.0 Chrome/18.0.997.0 Safari/535.15

URL:
  <http://savannah.gnu.org/bugs/?36025>

                 Summary: error in caching of class fuctions depending on
header line
                 Project: GNU Octave
            Submitted by: jan
            Submitted on: Wed 28 Mar 2012 04:40:49 PM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: jan pfaler
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.4
        Operating System: GNU/Linux

    _______________________________________________________

Details:

In short: 

Class member functions with errorneus header line are called differently
depending on caching context. Caused error is at the worst hard to debug.

Description: 

A class "testclass" having two public function "one" and "two" 
and the creator. The function "two" contains errorneus header line containing
reference to function "one" on it:
  
==> @testclass/two.m <==
 
% function TWO returns item "Y"

function a=one(m)
  disp('outputing second argument from TWO'); 
  a=m.y;
 

As a result octave calls function "one" instead of function 
"two" in following in an inconsistent way presumably depending 
on caching, see below: 


 
octave:79> clear all; 
octave:80> f=testclass(1,2); one(f), two(f), two(f) % expecting 1 2 2 
outputing first argument from ONE
ans =  1
outputing second argument from TWO
ans =  2
outputing second argument from TWO
ans =  2

octave:81> one(f), two(f), two(f) % expecting 1 2 2
outputing first argument from ONE
ans =  1
outputing first argument from ONE
ans =  1
outputing first argument from ONE
ans =  1
 

The code is attached. 

System standard Ubuntu 11.4 installation:
 
Linux sym 2.6.38-13-generic-pae #57-Ubuntu SMP Mon Mar 5 20:00:10 UTC 2012
i686 i686 i386 GNU/Linux

GNU Octave, version 3.2.4








    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 28 Mar 2012 04:40:49 PM GMT  Name: testclass.gz  Size: 10kB   By:
jan

<http://savannah.gnu.org/bugs/download.php?file_id=25496>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36025>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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