octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #40739] Attempt to allocate (size_t)-1 bytes w


From: Hartmut
Subject: [Octave-bug-tracker] [bug #40739] Attempt to allocate (size_t)-1 bytes when trying to length-INT_MAX create sparse vector
Date: Fri, 25 Nov 2016 22:10:38 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #5, bug #40739 (project octave):

I am not sure if this behavior is still present in Octave 4.2.0. It might well
be FIXED already.

* The original code sample now works like this:

>> s = sparse(1,2^31, 123);
error: index (_,2.14748e+09): subscripts must be either integers 1 to (2^31)-1
or logicals
>> s = sparse(1,2^31-1, 123);
error: out of memory or dimension too large for Octave's index type
>> s=sparse(1,2^30,123)
s =

Compressed Column Sparse (rows = 1, cols = 1073741824, nnz = 1 [9.3e-08%])

  (1, 1073741824) ->  123



* The code sample from comment #2 now works like this:

>> s = sparse(2^16,2^16,123)
s =

Compressed Column Sparse (rows = 65536, cols = 65536, nnz = 1 [2.3e-08%])

  (65536, 65536) ->  123

>> find(s)
ans = 0


I don't recognize any buggy behavior in the above, but I'm no sparse matrix
expert either...

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40739>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]