[Rd] supsmu produces segfault when handed all NAs. (PR#9519)

boe at demog.berkeley.edu boe at demog.berkeley.edu
Mon Feb 19 06:43:13 CET 2007


When handed an argument with all NAs, supsmu() causes a
sigfault causing termination of R.  The following example
reproduces the problem (on a linux gentoo system), but I have verified the 
same behavior on a solaris builds as well as several versions of R.


   x <- (1:100)/10;
   y <- sin(pi*x) + rnorm(length(x));
   tmp <- supsmu(x,y);  # works
   y[c(2,5,10)] <- NA;   # a few NAs is OK, warning generated
   tmp<-  supsmu(x,y);
   y<- NA + y;           # all NAs
   tmp <- supsmu(x,y);   # oops

  *** caught segfault ***
  address 0xfffffff8, cause 'memory not mapped'

  Traceback:
   1: .Fortran(R_supsmu, as.integer(leno), as.double(xo), 
as.double(y[ord]),     as.double(wt[o
rd]), as.integer(iper), as.double(span), as.double(bass),     smo = 
double(leno), double(n * 7
), double(1))
    2: supsmu(x, y)

    Possible actions:
    1: abort (with core dump)
    2: normal R exit
    3: exit R without saving workspace
    4: exit R saving workspace
    Selection:

--please do not edit the information below--

Version:
  platform = i686-pc-linux-gnu
  arch = i686
  os = linux-gnu
  system = i686, linux-gnu
  status =
  major = 2
  minor = 4.1
  year = 2006
  month = 12
  day = 18
  svn rev = 40228
  language = R
  version.string = R version 2.4.1 (2006-12-18)

Locale:
LC_CTYPE=en_US.utf8;LC_NUMERIC=C;LC_TIME=en_US.utf8;LC_COLLATE=en_US.utf8;LC_MONETARY=en_US.ut
f8;LC_MESSAGES=en_US.utf8;LC_PAPER=en_US.utf8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASURE
MENT=en_US.utf8;LC_IDENTIFICATION=C
Search Path:
  .GlobalEnv, package:stats, package:graphics, package:grDevices, 
package:utils, package:datase
ts, package:methods, Autoloads, package:base



More information about the R-devel mailing list