[Rd] error messages because of integer overflow

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Feb 20 00:49:20 MET 2004


Prof Brian Ripley <ripley at 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 at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list