Skip to content

PR#8282

1 message · Brian Ripley

#
The attempt made was to reproduce exactly the example you reported (of 
course).

Notice that this is incorrect usage, as you are trying to replace one 
element by 2.  We have since found another example of this, and fixed it, 
but it is nothing new in 2.2.0.  Please try a current version of R 
(R-patched or R-devel).  The relevant NEWS item is

     o	Subassignment of a vector which increased the length of the
 	vector _and_ had the wrong length of replacement could
 	occasionally segfault.  (This has been there since at least
 	mid 1997.)

It is poor practice to increase the size of a vector in this way rather
than pre-allocate.  Perhaps it has persisted so long because it is a user 
error in poor practice that can need 1000000 repeats to reproduce.
On Fri, 18 Nov 2005 pdbailey at uchicago.edu wrote: