NEFTH@pacbell.net
2002-May-28 06:42 UTC
Platform-specific: simple assignments in Rprofile cause core dump (PR#1604)
This only happens on platforms with a faulty implementation of realloc(). Some C libraries do not allow realloc() to be called with a NULL pointer to resize. The assignment ISOLatin1 <- 0:255 in Rprofile then causes a core dump. The attached set of 4 patches should be very safe to use and fix the problem. --please do not edit the information below-- Version: platform = i386-pc-sco3.2v4.2 arch = i386 os = sco3.2v4.2 system = i386, sco3.2v4.2 status = major = 1 minor = 4.1 year = 2002 month = 01 day = 30 language = R Search Path: .GlobalEnv, Autoloads, package:base
Prof Brian D Ripley
2002-May-28 07:33 UTC
(PR#1604) Re: Platform-specific: simple assignments in Rprofile cause core dump (PR#1604)
On Tue, 28 May 2002 NEFTH@pacbell.net wrote:> This only happens on platforms with a faulty implementation > of realloc(). Some C libraries do not allow realloc() to be > called with a NULL pointer to resize.What other platforms give the problem? The behaviour R assumes is required by the ISO C89 standard (at least according to Lewine's book). Would it not be better to fix realloc rather than R: there are many alternative implementations of malloc out there (and R uses one for Windows). One issue is that realloc is used in several R packages on CRAN, and quite possibly in others. These are likely to assume standard-conformant behaviour. (It is used in other places within the R sources too, but I assume you checked all of those.)> The assignment > > ISOLatin1 <- 0:255 > > in Rprofile then causes a core dump. The attached set > of 4 patches should be very safe to use and fix the problem. > > --please do not edit the information below-- > > Version: > platform = i386-pc-sco3.2v4.2 > arch = i386 > os = sco3.2v4.2 > system = i386, sco3.2v4.2 > status > major = 1 > minor = 4.1 > year = 2002 > month = 01 > day = 30 > language = RThat is not current. -- 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 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._