Skip to content

rbind(NULL, matrix("a", 5,3))

5 messages · Peter Dalgaard, Paul Gilbert

#
I'm get the following anti social behavior from R 0.62.1

Paul
_____
R : Copyright 1998, The R Development Core Team
Version 0.62.1  (June 15, 1998)
...
Arithmetic Exception - core dumped
$ $

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
Same thing happens here. What's that supposed to do anyway? 
Should be fixable with a bit of defensive coding. (The one good thing
about core dumps is that it is fairly easily to pinpoint where the
problem is...)
#
Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:
Fixed now. 

[In src/main/bind.c, just after line 913, insert

                               if ( k == 0 )
                                       mrows = 0;

]
#
I made this change, so the lines around 913 are now

     STRING(result)[i + n + (j * rows)] = STRING(u)[(i + j * mrows) % k];
    n += mrows;
                              if ( k == 0 )
                                       mrows = 0;
   }


and recompiled, but I still get the same problem:
Arithmetic Exception - core dumped

Paul


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
Aw, darn ...

Someone must have been adding stuff to my version but not yours...

The lines need to go  *before* the outer for loop. After line 909,
that is.