bugGNU Octave - Bugs: bug #36288, Accessing variables in some...

 
 

bug #36288: Accessing variables in some recursion gives wrong values if handle to private function is set.

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Tue 24 Apr 2012 08:37:48 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: InvalidAssigned to: None
Originator Name: Olaf TillOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 13 May 2014 06:41:17 PM UTC, comment #4:

Tracking this down, I found this is unrelated to the current bug, but rather related to lsode and global/persistent variables. In my last comment, I even had made a further mistake, so the description of the problem is not correct. I'd see no reason anymore to keep the current bug open. Really sorry for the noise. Will open a seperate bug report.

Olaf Till <i7tiol>
Project Member
Thu 08 May 2014 01:09:13 PM UTC, comment #3:

A similar problem is still present in Octave-3.8.0, revision ab775508dff9, although it can't be triggered with the original example. Inside an if-block, checking in its condition if a certain variable has a certain value, the value of the variable seen from a debug prompt by typing the variable name is different. Again, there is recursion involved, but this time only further up in the call-stack, the function where the problem shows up is not called recursively (but repeatedly).

Last time I could boil down the problem to a simple example, but that was much work. It should be easier now to check out the revision in which the original example triggered the bug and see there what happens, assuming it had the same reason.

Olaf Till <i7tiol>
Project Member
Mon 28 Oct 2013 02:38:33 AM UTC, comment #2:

Closing based on comment #1. I'm also not seeing the bug on the current development version. Must have been fixed sometime between 3.6 and 3.8.

Mike Miller <mtmiller>
Project Administrator
Mon 14 May 2012 05:16:34 PM UTC, comment #1:

I must have made a mistake while testing the default branch. I don't see the bug now in the given revision (6a736395ff7d) of the default branch with my testcode. I only see it in the given revision (000cd393f3c1) of the stable branch.

Olaf Till <i7tiol>
Project Member
Tue 24 Apr 2012 08:37:48 PM UTC, original submission:


Tested to occur in Octave versions:

- 3.6.1+ (000cd393f3c1),
- default (6a736395ff7d).

Description:

Accessing variables in some type of recursion gives wrong values if some (unrelated) handle to a private function was set.

Repeat by:

- Copy attached 'testfunction.m' into current directory,

- copy attached '__dummy_private_function__.m' into subdirectory '/private',

- start Octave freshly,

- run 'testfunction',

- from the debug prompt, enter v to see its value.

The bug shows up if you see a value of '2' for 'v', although you are in the body of an 'if' statement which tests for v==1. (The non-interactive 'printf' before has printed a value of '1' for 'v').

If you comment out the line in 'testfunction.m' which sets the handle to '__dummy_private_function__', the bug will not occur. Also, the bug only seems to occur in the first call to 'testfunction'.



Olaf Till <i7tiol>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25722:  testfunction.m added by i7tiol (652B - text/x-objcsrc)
file #25723:  __dummy_private_function__.m added by i7tiol (52B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by i7tiol (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 13 May 2014 06:58:49 PM UTCmtmillerStatusConfirmed=>Invalid
      Open/ClosedOpen=>Closed
    Thu 08 May 2014 01:48:01 PM UTCjordighStatusFixed=>Confirmed
      Open/ClosedClosed=>Open
    Mon 28 Oct 2013 02:38:33 AM UTCmtmillerCategoryNone=>Interpreter
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Release3.6.1=>dev
    Tue 24 Apr 2012 08:37:48 PM UTCi7tiolAttached File-=>Added testfunction.m, #25722
      Attached File-=>Added _dummy_private_function_.m, #25723

    Back to the top


    Powered by Savane 3.1-cleanup1