bugGNU Octave - Bugs: bug #53681, invalid conversion from lazy_index...

 
 

bug #53681: invalid conversion from lazy_index to int32

Submitted by:  None
Submitted on:  Tue 17 Apr 2018 06:51:38 PM UTC  
 
Category:  Interpreter Severity:  4 - Important
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Björne Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.2
Operating System:  GNU/Linux

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)

Thu 19 Apr 2018 06:35:15 PM UTC, comment #8: 

I pushed the following changeset on stable and merged with default:

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

Closing as fixed.

John W. Eaton <jwe>
Project Administrator
Thu 19 Apr 2018 04:00:01 PM UTC, comment #7: 

I will try to take a look a this today before making the 4.3.91 test release.

John W. Eaton <jwe>
Project Administrator
Thu 19 Apr 2018 03:12:48 PM UTC, comment #6: 

Doing a little bit of experimentation with the current stable branch, it appears that there is only a function for converting a lazy_index to a logical.  Other types just fail.

octave:1> xv = 0:0.01:20;
octave:2> tmp = find (xv < 0.05)
tmp =

   1   2   3   4   5

octave:3> typeinfo (tmp)
ans = lazy_index
octave:4> int32 (tmp)
error: invalid conversion from lazy_index to int32
octave:4> double (tmp)
error: invalid conversion from lazy_index to double
octave:4> logical (tmp)
ans =

  1  1  1  1  1

octave:5> single (tmp)
error: invalid conversion from lazy_index to single

Rik <rik5>
Project Administrator
Tue 17 Apr 2018 07:57:52 PM UTC, comment #5: 

And indeed, 22296 does have the problem.  So that is the cset to investigate.

Rik <rik5>
Project Administrator
Tue 17 Apr 2018 07:40:25 PM UTC, comment #4: 

I just verified that 22295 does not have the problem.

Rik <rik5>
Project Administrator
Tue 17 Apr 2018 07:06:18 PM UTC, comment #3: 

we think it is
22296 (8b18f46f6427) revamp double, single, int type conversions …

Doug Stewart <dastew>
Tue 17 Apr 2018 07:00:09 PM UTC, comment #2: 

Confirmed.  It is a regression from 4.0.3 where this works:

xv = 0:0.01:20; int32(find(xv<0.05))
ans =

  1  2  3  4  5

In 4.2.0 it is already broken.

xv = 0:0.01:20; int32(find(xv<0.05))
error: invalid conversion from lazy_index to int32

Rik <rik5>
Project Administrator
Tue 17 Apr 2018 06:59:24 PM UTC, comment #1: 

Confirmed, and still present in the 4.3.90 release candidate.

With Octave 4.0,

>> xv = 0:0.01:20;
>> idx = find (xv < 0.05);
>> typeinfo (idx)
ans = lazy_index
>> int32 (idx)
ans =

  1  2  3  4  5

With Octave 4.2.2

>> xv = 0:0.01:20;
>> idx = find (xv < 0.05);
>> typeinfo (idx)
ans = lazy_index
>> int32 (idx)
error: invalid conversion from lazy_index to int32

Mike Miller <mtmiller>
Project Administrator
Tue 17 Apr 2018 06:51:38 PM UTC, original submission:  

See this code:

octave> xv = 0:0.01:20; int32(find(xv<0.05))
error: invalid conversion from lazy_index to int32

it is a regression.

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 jwe (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (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
    2018-04-19 jwe StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2018-04-17 rik5 CategoryOctave Function => Interpreter
    2018-04-17 mtmiller Severity3 - Normal => 4 - Important
        Item GroupNone => Regression
        StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.5