Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Hervé Pagès
Duncan Murdoch wrote: On 16/07/2009 5:06 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Duncan Murdoch
On 16/07/2009 5:06 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan,

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Hervé Pagès
Duncan Murdoch wrote: On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an e

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Duncan Murdoch
On 7/16/2009 2:34 PM, Hervé Pagès wrote: Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at th

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Hervé Pagès
Duncan Murdoch wrote: On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at the C code too and was able to recognize a p

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-16 Thread Duncan Murdoch
On 15/07/2009 10:15 PM, Hervé Pagès wrote: I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at the C code too and was able to recognize a pattern that is indeed e

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-15 Thread Hervé Pagès
I have to confess that I'm a little bit puzzled by how the PROTECT/UNPROTECT mechanism is used in the C code of R. Duncan, you say the problem you just fixed was an easy one. I looked at the C code too and was able to recognize a pattern that is indeed easy to identify as problematic: an unprot

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-15 Thread murdoch
On 15/07/2009 8:30 PM, murd...@stats.uwo.ca wrote: > On 15/07/2009 8:08 PM, Hervé Pagès wrote: >> Hi, >> >>> x <- c(a=10, b=20) >>> length(x) <- 1 >>> x >> a >>10 >> >> But with gctorture turned on, I get: >> >>> gctorture(TRUE) >>> x <- c(a=10, b=20) >>> length(x) <

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-15 Thread Hervé Pagès
murd...@stats.uwo.ca wrote: On 15/07/2009 8:30 PM, murd...@stats.uwo.ca wrote: On 15/07/2009 8:08 PM, Hervé Pagès wrote: Hi, > x <- c(a=10, b=20) > length(x) <- 1 > x a 10 But with gctorture turned on, I get: > gctorture(TRUE) > x <- c(a=10, b=20) > length(x) <- 1

Re: [Rd] Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)

2009-07-15 Thread murdoch
On 15/07/2009 8:08 PM, Hervé Pagès wrote: > Hi, > >> x <- c(a=10, b=20) >> length(x) <- 1 >> x > a >10 > > But with gctorture turned on, I get: > >> gctorture(TRUE) >> x <- c(a=10, b=20) >> length(x) <- 1 >> x > a >"a" < ??? > >> x <- c(a=1