bugGNU Octave - Bugs: bug #60245, Wrong result with nested function...

 
 

bug #60245: Wrong result with nested function calls

Submitter:  Marco <marco2021>
Submitted:  Tue 16 Mar 2021 07:34:20 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  marco2021 Open/Closed:  * Closed
Release:  * 6.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 02 Apr 2021 08:43:52 AM UTC, comment #3: 

With Matlab R2021a, I see the following:

>> run_f1

x =

     2


x =

     2


That is basically the same like I see with builds from the current stable and default branches after your recent changes.

Closing as fixed.

Any plans for when Octave 6.3 might be released?

Markus Mützel <mmuetzel>
Group administrator
Thu 01 Apr 2021 07:48:10 AM UTC, comment #2: 

What is the expected correct result for the run_f1 script?  After the following changes I made for bug #60137 and bug #60237, I see:


octave:1> cd issue
octave:2> run_f1
x = 2
x = 2


http://hg.savannah.gnu.org/hgweb/octave/rev/0574c36a095e
http://hg.savannah.gnu.org/hgweb/octave/rev/c74ff452e2bb
http://hg.savannah.gnu.org/hgweb/octave/rev/34d06c73b48d

These changesets make changes in public interfaces, which is something that we try to avoid during a stable release series.  OTOH, they are important to make handles to nested and anonymous functions work properly.  And since handles to nested functions were one of the big new features of Octave 6, I'm in favor of making this change in version 6 even if it causes some (small) backward compatibility issues.  These interfaces are not something that typical users (even those who write .oct files) will encounter.

John W. Eaton <jwe>
Group administrator
Wed 17 Mar 2021 08:50:31 AM UTC, comment #1: 

Thanks for your report.

I can confirm your test case still fails with builds from the current stable and default branch.

I can also confirm that the same test case runs without error with Octave 6.1 but fails with Octave 6.2.

It works without error with Matlab R2020b.

Markus Mützel <mmuetzel>
Group administrator
Tue 16 Mar 2021 07:34:20 PM UTC, original submission:  

run_f1.m (attached files) leads to variable with wrong value during execution.
With octave 6.1.0 the problem does not occur.

Related to:
https://octave.discourse.group/t/bug-in-octave-6-2-0-with-nested-function-calls/820

Marco <marco2021>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51079:  issue.zip added by marco2021 (1009B - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by marco2021 (Submitted the item)
  • -email is unavailable- added by marco2021
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-02 mmuetzel StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2021-04-01 jwe StatusConfirmed Need Info
    2021-03-17 mmuetzel Item GroupIncorrect Result Regression
        StatusNone Confirmed
        Operating SystemGNU/Linux Any
    2021-03-16 marco2021 Attached File- Added issue.zip, #51079
        Carbon-Copy- Added marco2021

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code