[R] Problems with .C - [Ff]ree()?

Mark White mjw at celos.net
Mon Jan 14 23:17:59 CET 2002


I've just pulled my R installations up to 1.4.0, and am
having trouble with some of my dyn.load'd C code: R
frequently segfaults after .C calls into the (newly rebuilt)
libraries.  It hasn't happened with any previous versions of
R I've used.

I do seem to be able to make things behave by removing calls
to free().  Changing everything to Calloc() and Free(),
didn't help, however.  Stack traces aren't especially
useful; it often segfaults in operations relating to freeing
vectors, but not always: for example, I recently has a spate
of segfaults in seq().  It does appear to behave if I remove
all the .C calls.  It also seems to be more stable if I've
already created some large vectors in R before I start
making external calls.

Any thoughts?  This is on NetBSD, btw.

Mark <><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list