[Rd] as.environment.list provides inconsistent results under torture

2011-01-11 Thread Romain Francois
Hello, Using R-devel (rev 53950), I get inconsistent results with as.environment( VECSXP ) when gctorture is on. Consider: a - list( aa = rnorm, bb = runif ) gctorture(TRUE) as.environment( a ) The last line sometimes produces the correct environment, but sometimes I get errors. Here are

Re: [Rd] [Rcpp-devel] Loading a package using Rcpp Modules results in memory corruption

2011-01-11 Thread Dominick Samperi
On Tue, Jan 11, 2011 at 2:41 PM, Romain Francois rom...@r-enthusiasts.comwrote: Le 11/01/11 19:57, Romain Francois a écrit : Le 11/01/11 19:46, Douglas Bates a écrit : On Tue, Jan 11, 2011 at 12:27 PM, Dominick Samperidjsamp...@gmail.com wrote: On Tue, Jan 11, 2011 at 1:20 PM, Romain

Re: [Rd] as.environment.list provides inconsistent results under torture

2011-01-11 Thread Simon Urbanek
Interesting, I'd argue that the bug is in eval() not protecting its arguments since the usual convention is for functions to protect its arguments... On Jan 11, 2011, at 2:33 PM, Romain Francois wrote: Hello, Using R-devel (rev 53950), I get inconsistent results with as.environment(

Re: [Rd] as.environment.list provides inconsistent results under torture

2011-01-11 Thread luke-tierney
No. Lots of internal functions expect their callers to protect their arguments, for efficiency reasons. eval is called very often and almost always with argument that are protected because they are in the evaluation engine, so it would be wasteful and potentially very costly if eval protected its

Re: [Rd] as.environment.list provides inconsistent results under torture

2011-01-11 Thread Simon Urbanek
On Jan 11, 2011, at 6:55 PM, luke-tier...@uiowa.edu luke-tier...@uiowa.edu wrote: No. Lots of internal functions expect their callers to protect their arguments, for efficiency reasons. eval is called very often and almost always with argument that are protected because they are in the