[Rd] segfault when applying strange coercion (PR#2923)

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon May 5 20:08:27 MEST 2003


ligges at statistik.uni-dortmund.de writes:

> I made a mistake -- and R crashed. A (more or less) reproducible example 
> seems to be:
> 
>    x <- matrix(nrow=20000, ncol=20)
>    x$any <- numeric(0)
> 
> It is possible to crash R by executing these lines several times (1 - 
> 20) on Windows as well as on Solaris (might be related to PR#2880 - 
> let's call it "non-existing list elements")

Linux too: (r-devel)

...
> x <- matrix(nrow=20000, ncol=20) ;    x$any <- numeric(0)
Warning message:
Coercing LHS to a list
> x <- matrix(nrow=20000, ncol=20) ;    x$any <- numeric(0)

Program received signal SIGSEGV, Segmentation fault.
Rf_copyMostAttrib (inp=0xa2325a8, ans=0x402f9008)
    at ../../../R/src/main/attrib.c:155
155             if ((TAG(s) != R_NamesSymbol) &&

Tried running it with gctorture() but haven't gotten the prompt back
yet.... 

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