From p.dalgaard at biostat.ku.dk  Thu Aug  7 22:24:32 2003
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard BSA)
Date: Thu Aug  7 23:24:35 2003
Subject: [Rd] segmentation fault: formula() with long variable names
	(PR#3680)
In-Reply-To: <200308071832.h77IWoJH013390@pubhealth.ku.dk>
References: <200308071832.h77IWoJH013390@pubhealth.ku.dk>
Message-ID: <x2isp9b1f1.fsf@biostat.ku.dk>

jerome@hivnet.ubc.ca writes:

> R version: 1.7.1
> OS: Red Hat Linux 7.2
> 
> In this example, I would expect an error for the overly long variable 
> name. This is always reproducable for me.
> 
> > formula(paste("y~",paste(rep("x",50000),collapse="")))
> Segmentation fault

Also in (reasonably) current r-devel. But why would you want to do
that?

The cause of the crash is that R_GlobalContext is getting clobbered by
the x's, leading to

Program received signal SIGSEGV, Segmentation fault.
0x0809f491 in Rf_error (format=0x817d7ef "symbol print-name too long")
    at ../../../R/src/main/errors.c:520


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


[Rd] segmentation fault: formula() with long variable names (PR#3680)
Peter Dalgaard BSA