Skip to content
Prev 14313 / 15075 Next

another R crash issue

This is a clear bug in gmp (the R package) - simply division by zero in

templateMatrix.h:126:    return this->size() / nRows();

  * frame #0: 0x00000001076e1b12 gmp.so`math::Matrix<bigrational>::nCols(this=0x00007ffeefbfc5d8) const at templateMatrix.h:126:25 [opt]
    frame #1: 0x00000001076ea253 gmp.so`matrixz::bigint_transpose(mat=0x00007ffeefbfc5d8) at matrix.cc:484:23 [opt]
    frame #2: 0x00000001076eb3be gmp.so`::biginteger_rbind(args=0x0000000108a60848) at matrix.cc:459:12 [opt]

i.e., bigint_transpose() cannot deal with 0-row matrices. That may be just the tip of the ice berg, even biginteger_rbind itself should probably just skip zero-length objects.

Cheers,
Simon