[Rcpp-devel] Segfault error during simulation in Rcpp

Dirk Eddelbuettel edd at debian.org
Thu May 16 21:11:45 CEST 2013


On 16 May 2013 at 14:49, Jonathan Olmsted wrote:
| Several things.
| 
| Xiao, Dirk's code gives me a segfault immediately and reliably.
| 
| All, when I do this whole song and dance using the "old" Rcpp/inline/
| cxxfunction approach, I don't have any issues. One obvious difference you can
| see (like was mentioned) in the generated code (visibile using verbose=TRUE) is
| the declaration of an RNGScope object.
| 
| But, if the memory issue crops up when you call a C++ function (syncing with
| R's RNG state) 1e6 times AND you are already writing C++ maybe this is an
| opportunity to just put one more layer of the code into C++ and create only one
| such RNGScope object?

Beautiful. So we get to blame R Core after all?  ;-)

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list