R-alpha: eigen

Thomas Lumley thomas@biostat.washington.edu
Fri, 22 Aug 1997 09:33:18 -0700 (PDT)


On Fri, 22 Aug 1997, Jim Lindsey wrote:

> eigen(matrix(rep(1,9),ncol=3),only.values=T)
> 
> works repeatedly but eventually (after 3 or 4 goes) gave a core dump
> of 11mb (I think only the first answer was right).
> 

The bug in foreign function calling pointed out by Martin in a different
context does this, if you haven't fixed it (it's more recent than 50a3).
In naoktrim in dotcode.c, which begins 
static SEXP naoktrim(SEXP s, int * len, int *naok, int *dup)
{
        SEXP value;

        if(s == R_NilValue) {
                value = R_NilValue;
                *naok = 0;
                *dup = 0;
                *len = 0;
        }
   
change *dup = 0 to *dup = 1.



Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

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