[Rcpp-devel] Memory problem when compiling Rcpp/RcppEigen/lme4 with clang++

Douglas Bates bates at stat.wisc.edu
Wed May 16 21:31:57 CEST 2012

I have been running into yet another memory problem in testing the
development version of lme4.  After doing the usual valgrind,
gctorture, gdb, etc. dance I found that the problem was originating in
the destructor of an Eigen object that included some cholmod
structures.  The problem was that the particular place where it was
failing is not a place where it should have gotten to.  (It should
only have called cholmod_free_factor and it was failing in
cholmod_free_dense.  Both of these are routines that are exposed
through the funky R_GetCCallable function in
RcppEigen/inst/include/RcppEigenStubs.h).  The problem went away when
I switched to g++.  For the time being I would recommend caution if
you choose to use clang++ to compile code linking to RcppEigen.

More information about the Rcpp-devel mailing list