From p.dalgaard@kubism.ku.dk  Mon Jun  9 22:13:42 1997
From: p.dalgaard@kubism.ku.dk (Peter Dalgaard BSA)
Date: 09 Jun 1997 23:13:42 +0200
Subject: R-alpha: Transposition bug
Message-ID: <x2afkzlbsp.fsf@bush.kubism.ku.dk>

Shortest program to crash R?

> t(table(1))
Floating point exception (core dumped)

One-dimensional tables don't act like vectors, obviously. The crash
comes from an integer divide-by-zero (yup, that causes a SIGFPE) in

#0  0x8058e0b in do_transpose (call=0x4050c1e4, op=0x401c65fc, 
    args=0x4050c1bc, rho=0x4050e4e4) at array.c:545
545                             INTEGER(r)[i] = INTEGER(a)[(i / ncol)
+ (i % ncol) * nrow];


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


R-alpha: Transposition bug
Peter Dalgaard BSA