model.matrix crashes (PR#189)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
11 May 1999 22:59:28 +0200


thomas@biostat.washington.edu writes:

> On Tue, 11 May 1999 jlindsey@alpha.luc.ac.be wrote:
> 
> > With 0.64.1 on Intel RH5.2,
> > 
> > abc <- list()
> > abc$abc$abc <- matrix(1:20)
> > mt <- terms(~(abc$abc$abc[,1]==64)|(abc$abc$abc[,1]==65)|(abc$abc$abc[,1]==75)
> > 	|(abc$abc$abc[,1]==84)|(abc$abc$abc[,1]==85))
> > model.matrix(mt,model.frame(mt))
> > 
> > crashes. With ab$ab$ab, it does not. Apparently, the bug I reported
> > for 0.64.0 has just been pushed back one step. Jim
> 
> I can't reproduce this on Solaris.

I can, on Linux, RH6.0.

The problem is neatly described in src/main/model.c:1690

    /* FIXME : we need to check for buffer overflow here. */

I've upped the BUFSIZE from 128 to 4096, which should push the problem
a bit further back....

-- 
   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
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._