[Rcpp-devel] Loading a package using Rcpp Modules results in memory corruption
Dominick Samperi
djsamperi at gmail.com
Mon Jan 10 20:55:30 CET 2011
On Mon, Jan 10, 2011 at 2:11 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 10 January 2011 at 13:30, Dominick Samperi wrote:
> | Is the fix that I proposed and that was confirmed by the three of us a
> dream?
>
> A 'fix'? Where is posting a ten-liner that exhibits a perceived bug a
> 'fix'?
>
> As for the relevance of gctorture, I argued before that our approach of
> proxy
> classes aims for protection at the C++ scope level and NOT at the
> instruction
> level (which is fine for C) -- and as such, gctorture is not a good tool. R
> is single-threaded, outside of gctorture we are not likely to get hit by gc
> while within a single scope, so the test is not valid. Which is why I call
> the bug 'perceived'. Actual bug tests are in our unit tests.
>
> Moreever, I sent your example back, reworked and with a third block in
> Rcpp,
> and it did not fail under gctorture. Ignore this as as you will... but I
> run
> code with Rcpp every (business) day (on datasets large and small), and it
> has
> yet to fail once on a memory issue. So whatever.
>
The symptoms of memory corruption are machine/compiler/OS-dependent and
the idea that "it has yet to fail once on a memory issue" should elicit
howls of
laughter from experienced software developers. It is as if the following
code is considered safe because "it has yet to fail once", or because of
the "advanced C++ design patterns that we use":
double *x = new double[100];
x[0] = 1.0;
delete [] x;
double y = x[0];
...
>
> | My package cxxPack does not compile because YOU "released" RcppClassic,
>
> Cute. Your package happened to be broken for months already, i.e. well
> before
> we responded to _your_ very public email list terror here and on r-devel by
> splitting the old deprecated code off. That was triggered by _you_, so now
> blaming me is cute. Too cute.
>
What I requested is that you not use my name in any context because of
our bad history. I did not ask that you create an R package that creates a
lasting
bond between us! Nobody is using this package, and there is no reason for
it to exist, except for spiteful and scandalous purposes.
For those who may be tempted to release "free software," this is an
illustration of the greatest hazard. Imagine seeing your prior work
"released as deprecated" in a public CRAN repository.
Dominick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110110/0979177b/attachment.htm>
More information about the Rcpp-devel
mailing list