R-alpha: Re: contr.helmert: bug (??) don't have the SAME problem
Peter Dalgaard BSA
p.dalgaard@kubism.ku.dk
07 May 1997 16:10:03 +0200
Martin Maechler <maechler@stat.math.ethz.ch> writes:
>
> [I diverged to R-devel]
>
> Peter, I cannot reproduce your bug
> I can type
>
> solve(cbind(c(1,1,1,1),contr.helmert(4)))
>
> many times, and never get an error.
...
> Process R segmentation violation at Wed May 7 14:22:57 1997
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Also, it seems to behave differently in different circumstances. When
I reported it, I had started R from a read-only directory. In my home
directory, I get this:
> A<-contr.helmert(4)
> X<-cbind(c(1,1,1,1),A)
Error: Unimplemented feature in duplicate
> ls()
Error: Unimplemented feature in duplicate
> > ls
Error: Unimplemented feature in deparse2buff
Can you say "random memory overwrite"?
<imagine long and arduous gdb session here>
In main/bind.c:753, I see
STRING(CADR(dn))[j++] = blank;
Later on, during garbage collection, the same memory location gets
marked, setting a bit in the pointer, which gets accessed a split
second later, and... kerunch!
I suspect that should have said ...=duplicate(blank) , right? Or is
it the marking process in gcc. Hmm... not sure I got it straight
there, but somehow the "blank" value, which is a SEXP (aka *SEXPREC)
is getting treated as a SEXPREC.
--
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-