[Rcpp-devel] $ extraction from an Rcpp module causes error under gctorture

Dominick Samperi djsamperi at gmail.com
Fri Jan 7 07:11:30 CET 2011


The Module function in Module.R is mysterious because it is not clear from
the code itself or from the docs that the second argument can be a DLLInfo,
yet that is what appears in your example. Also, this function is re-entered
for the same object, with different logic each time. When the module
parameter is a string only an S4 class template is returned. Then later
it is called again (with this S4 template) and the C++ classes are filled
in. Finally, it appears that showClass(unif_module) causes Module()
to be called again, with the side-effect of recontructing the class. But
showClass(unif_module) should just be a query??? The same thing
happens with show(unif_module).

Generally speaking, how can we be sure that poking variables into R's
address
space from the C++ side will not cause aliasing problems due to R's
attempt to limit the amount of copying, which can lead to memory issues
like the ones you have reported?

Dominick

On Thu, Jan 6, 2011 at 5:17 PM, Douglas Bates <bates at stat.wisc.edu> wrote:

> I finally managed to get an example from the Rcpp documentation to fail for
> me.
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110107/88678e17/attachment-0001.htm>


More information about the Rcpp-devel mailing list