[Top][All Lists]

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

[Octave-bug-tracker] [bug #30423] Incorrect limit for array sizes?

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #30423] Incorrect limit for array sizes?
Date: Mon, 12 Jul 2010 17:17:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100501 Iceweasel/3.5.9 (like Firefox/3.5.9)


                 Summary: Incorrect limit for array sizes?
                 Project: GNU Octave
            Submitted by: jwe
            Submitted on: Mon 12 Jul 2010 05:17:46 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: John W. Eaton
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux



When using a 32-bit signed integer for octave_idx_type, I would expect to be
able to create an array with intmax ('int32') elements, but that fails:

  octave:1> z = zeros (intmax ('int32'), 1, 'int8');
  error: memory exhausted or requested size too large for range of Octave's
index type -- trying to return to prompt

However, I am able to create an array with intmax ('int32') - 1 elements:

  octave:1> z = zeros (intmax ('int32') - 1, 1, 'int8');
  octave:2> format long
  octave:3> size (z)
  ans =

     2147483646            1

This is on a 64-bit Debian system, but I'm not configuring with --enable-64. 
Even so, shouldn't it be possible to use all intmax ('int32') elements?

I think the problem is with dim_vector::safe_numel, but I don't see a proper
fix at the moment.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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