[Rd] writing to gzfile: segmentation fault (PR#2347)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Thu Dec 5 07:45:03 2002


On Wed, 4 Dec 2002, Dirk Eddelbuettel wrote:

> On Thu, Dec 05, 2002 at 01:30:19AM +0100, vograno@arbitrade.com wrote:
> > Full_Name: Vadim Ogranovich
> > Version: Version 1.6.0  (2002-10-01)
> > OS: Red Hat 7.1
> > Submission from: (NULL) (209.99.241.1)
> >
> >
> > The following sequence of commands crashes my R session. The first weirdness
> > happens after the second command that appears not to change the "foo.gz" file,
> > no error generated.
> >
> > > con <- gzfile("foo.gz", open="w"); cat("goo\n", file=con); close(con)
> > con <- gzfile("foo.gz", open="w"); cat("goo\n", file=con); close(con)
> > > cat("boo\n", file=gzfile("foo.gz"))
> > # this doesn't change "foo.gz"
> > cat("boo\n", file=gzfile("foo.gz"))
> > > con <- gzfile("foo.gz", open="w"); cat("goo\n", file=con); close(con)
> > con <- gzfile("foo.gz", open="w"); cat("goo\n", file=con); close(con)
> > > cat("boo\n", file=gzfile("foo.gz"))
> > cat("boo\n", file=gzfile("foo.gz"))
> >
> > Process R segmentation fault at Wed Dec  4 16:13:32 2002
>
> Try upgrading -- 1.6.1 on Debian is happy:

And 1.6.0 is happy here on RH7.2. Upgrading would be a good idea,
but I suspect the problem is in the zlib installation and/or the
flaky un-released compilers shipped by RedHat.  In particular, zlib
ought to have been upgraded to 1.1.4.  Has it?

In short, this is not an R problem, and RH7.1 is old and not known as the
model of stability.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595