bugGNU Octave - Bugs: bug #62293, Setting max_recursion_depth = inf...

 
 

bug #62293: Setting max_recursion_depth = inf goes beyond infinity

Submitter:  None
Submitted:  Mon 11 Apr 2022 05:18:43 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.1.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 12 Apr 2022 07:01:02 AM UTC, comment #1: 

`max_recursion_depth` is a function. You assigned a value to `max_recursion_depth` shadowing that function with a variable of the same name.
To call the function instead, (clear the variable if it is still in your workspace and) call `max_recursion_depth (Inf)` instead. However, there seems to be an upper limit(?) to the maximum recursion depth:

>> max_recursion_depth (Inf)
>> max_recursion_depth ()
ans = 2.1475e+09
>> intmax ('int32')
ans = 2147483647


Imho, it does make sense to keep a finite recursion limit.

Closing as invalid. But please comment if you think this is a valid bug.

Markus Mützel <mmuetzel>
Group administrator
Mon 11 Apr 2022 05:18:43 PM UTC, original submission:  

Test function:

function y = f(x)
  y = f(x);
endfunction


Remove limit on recursion depth:

>> max_recursion_depth = inf
max_recursion_depth = Inf


Expected system error, but Octave exceeded infinite recursions:

>> f (0)
error: max_recursion_depth exceeded
error: called from
    f
    f at line 2 column 8


Anonymous

 

(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 mmuetzel (Posted a comment)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-12 mmuetzel CategoryOther Interpreter
        StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code