From ripley at stats.ox.ac.uk  Thu Feb 19 15:11:32 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu Feb 19 15:11:39 2004
Subject: [Rd] error messages because of integer overflow
In-Reply-To: <4034B5E8.30302@statistik.uni-dortmund.de>
Message-ID: <Pine.LNX.4.44.0402191404080.27896-100000@gannet.stats>

All of these stem from the use of constructions like

    len = asInteger(CADR(args));

and a failure to check the return value for NA.

We'll add suitable checks, so don't bother with a bug report.

On Thu, 19 Feb 2004, Uwe Ligges wrote:

> This might be worth a wishlist/bug report (I'll submit it as such if 
> nobody disagrees).
> 
> 
> The following objects are nonsense in a way (too huge). It may happen, 
> that you have got a bug in your code that generates such objects, so it 
> would be great to get another error message telling the problem more 
> precisely.
> 
> Obviously, the following error messages are caused by an integer overflow:
> 
> numeric(2^31)
> Error in vector("double", length) : negative length vectors are not allowed
> 
> matrix( , 2^31, 1)
> Error in matrix(, 2^31, 1) : negative extents to matrix
> 
> matrix( , 2^31/10, 100)
> Error in matrix(, 2^31/10, 100) : negative length vectors are not allowed
> 
> 
> Uwe Ligges
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] error messages because of integer overflow
Prof Brian Ripley