From p.dalgaard at biostat.ku.dk  Fri Feb 20 00:49:20 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Fri Feb 20 00:48:50 2004
Subject: [Rd] error messages because of integer overflow
In-Reply-To: <Pine.LNX.4.44.0402191404080.27896-100000@gannet.stats>
References: <Pine.LNX.4.44.0402191404080.27896-100000@gannet.stats>
Message-ID: <x2eksqhbpb.fsf@biostat.ku.dk>

Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:

> 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.

We should probably take notice that these integer calculations
effectively limit the size of a vector to 2G-elements (2^31-1 ==
2147483647), i.e. 16GB for numeric() and 8GB for integer(). That's
hardly going to bite many people just now, but within a few years it
might. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] error messages because of integer overflow
Peter Dalgaard