bugGNU Octave - Bugs: bug #54995, Removal of called_from_builtin

 
 

bug #54995: Removal of called_from_builtin

Submitted by:  Guillaume <gyom>
Submitted on:  Fri 09 Nov 2018 04:56:17 PM UTC  
 
Category:  Interpreter Severity:  5 - Blocker
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Wed 16 Jan 2019 08:12:20 PM UTC, comment #11: 

With the test fixed, closing as fixed as per comment #7.

Markus Mützel <mmuetzel>
Project Member
Tue 15 Jan 2019 07:13:45 PM UTC, comment #10: 

@Guillaume: I renamed the class like you proposed and no longer see the regression.
Pushed to stable here:
http://hg.savannah.gnu.org/hgweb/octave/rev/0447e44cd18b

Markus Mützel <mmuetzel>
Project Member
Mon 14 Jan 2019 11:19:14 AM UTC, comment #9: 

It works if I run the test manually but there is indeed an error with 'make check'. The full error message from the log file is:

***** test <*54995>
obj = testclass ();
assert (obj.x(1), 1);
!!!!! regression: https://octave.org/testfailure/?54995
mismatch in number of fields

The issue seems to be that there is another test with a class with the same name, bug-36025/@testclass/testclass.m, that is executed beforehand in the same Octave session. Maybe we should just rename testclass to be testclass54995?

Guillaume <gyom>
Sun 13 Jan 2019 11:29:49 AM UTC, comment #8: 

The new test is failing on the buildbots:

>>>>> processing /scratch/buildbot/workers/jwe-debian-x86_64-0/stable-clang-4_0-debian/src/test/bug-54995/bug-54995.tst
***** test <*54995>
obj = testclass ();
assert (obj.x(1), 1);

Markus Mützel <mmuetzel>
Project Member
Sat 12 Jan 2019 04:50:22 PM UTC, comment #7: 

Thank you; in my eyes, it was indeed a blocker but it's now all back to normal.

Guillaume <gyom>
Sat 12 Jan 2019 02:18:56 PM UTC, comment #6: 

I backed out the change and added the test from comment #2 on stable and merged those changes with default.

John W. Eaton <jwe>
Project Administrator
Sat 12 Jan 2019 07:48:28 AM UTC, comment #5: 

I forgot to mention that Dynare (http://www.dynare.org) would become basically unusable if this issue is not fixed.

Sébastien Villemot <svillemot>
Sat 12 Jan 2019 07:46:04 AM UTC, comment #4: 

For me it is a serious regression. And it's easy to fix (just reverting one commit).

Sébastien Villemot <svillemot>
Sat 12 Jan 2019 12:02:29 AM UTC, comment #3: 

@jwe: Is this a blocker for the 5.0 release?

Rik <rik5>
Project Administrator
Wed 21 Nov 2018 10:17:06 AM UTC, comment #2: 

I attach a test case corresponding to the example below.  It is a regression for a common construct when writing @classes so I would classify its severity as high.

Writing a minimal test case for bug #32296 will take longer but I think fixing it is lower priority than the one mentioned here.

(file #45505)

Guillaume <gyom>
Fri 09 Nov 2018 05:32:26 PM UTC, comment #1: 

When I removed called_from_builtin, I looked for a bug report or message about it but didn't find anything.

We should add both of these test cases with bug numbers to the build system for future reference.  I can do that but it may take a few days.

John W. Eaton <jwe>
Project Administrator
Fri 09 Nov 2018 04:56:17 PM UTC, original submission:  

The called_from_builtin function was recently removed:

https://hg.savannah.gnu.org/hgweb/octave/rev/920a4ad8043b

It has the consequence of reintroducing the bug described here:

http://lists.gnu.org/archive/html/help-octave/2009-04/msg00307.html

and initially fixed there (where called_from_builtin was added):

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

For simplicity, I copy here a small example that illustrates the bug:

# Save as @myclass/myclass.m
function obj = myclass ()

  obj = struct ("a", rand(1));
  obj = class(obj, "myclass");

endfunction

# Save as @myclass/subsref.m
function val = subsref (obj, S)

  idx.type = S.type;
  idx.subs = {S.subs};

  val = builtin ("subsref", obj, idx);

endfunction

octave> obj = myclass ();
octave> obj.a
error: max_recursion_depth exceeded
error: called from
    subsref at line 6 column 7

A positive consequence is that it fixes bug #32296, e.g. Mike's example from comment #7 now works.

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45505:  bug-54995.zip added by gyom (2KiB - 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 mmuetzel (Posted a comment)
  • -email is unavailable- added by svillemot (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by svillemot
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-16 mmuetzel StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2019-01-12 jwe Severity3 - Normal => 5 - Blocker
        StatusNone => Ready For Test
    2018-12-12 svillemot Carbon-Copy- => Added svillemot
    2018-11-21 gyom Attached File- => Added bug-54995.zip, #45505

    Back to the top


    Powered by Savane 3.5