bugGNU Octave - Bugs: bug #47468, ones() is able to create array...

 
 

bug #47468: ones() is able to create array with number of elements above sizemax

Submitted by:  Carnë Draug <carandraug>
Submitted on:  Sat 19 Mar 2016 07:04:24 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
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.

 

Fri 30 Dec 2016 10:52:51 AM UTC, comment #3:

I can confirm this problem with octave 3.8.2 (Ubuntu Linux 12.04) too for zeros function.

When I do a fresh start of octave with experimental forced GUI I can generate

without errors.

When I try to add some other variables to that, lets say

it is even possible to add a few arrays with small size (~10 - 50 square arrays).

.

Then I clear everything and repeat the steps but

even the 18059*18059 zeros aren't working.

Add some point even arrays with

won't work.

Is there no possiblity to check how much unfragmented memory is still available for arrays in octave by a

My System Specs (lshw -short) and Linux distro is...

best regards

Niko

Anonymous
Wed 30 Mar 2016 10:58:06 AM UTC, comment #2:

I think Octave has a real indexing problem in large border cases.
For sparse matrices it depends whether the exceeding dimension was given as first or second argument. (see bug #45963)

Kai Torben Ohlhus <siko1056>
Project Member
Sat 19 Mar 2016 07:37:41 PM UTC, comment #1:

Actually, I am probably on the border of my available memory so the error comes from there instead of input checking (for the case of zeros).

But the original issue remains that 'ones (1, sizemax ()+1)' is doing something odd (now that I think about it is also returning too quickly). It behaves as expected when I specify its type:

Carnë Draug <carandraug>
Project Member
Sat 19 Mar 2016 07:04:24 PM UTC, original submission:

The functions ones() is able to create an array with more elements than it should.

The problem is probably on input check. It is able to create an array with one element above sizemax (I will report a separate bug for the limit of sizemax which is one below the numeric limit of int32).

Interestingly, this only works when sizemax is the number of columns:

zeros () is more sensitive the other way and even fails when creating an array with numel == sizemax:

and even for less elements than sizemax():

Carnë Draug <carandraug>
Project Member

 

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

Attach File(s):
   
   
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 siko1056 (Posted a comment)
  • -email is unavailable- added by carandraug (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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1