Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-19 Thread Dirk Eddelbuettel
On 18 March 2010 at 21:04, Alistair Gee wrote: | I'm not sure that you can verify the fix with an empirical test, short | of using something like valgrind b/c the bug would occur only due to | chance: | | Here is a simpler scenario: | | ColDatum c1; // via the default constructor | Col

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-18 Thread Alistair Gee
On Thu, Mar 18, 2010 at 8:03 PM, Dirk Eddelbuettel wrote: > > Note to self, no more coding when tired... > > On 18 March 2010 at 21:49, Dirk Eddelbuettel wrote: > | So I became a little more ambitious and made the runit file a fuller test of > | ColDatum and RcppFrame (both of the old API): > | >

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-18 Thread Dirk Eddelbuettel
Note to self, no more coding when tired... On 18 March 2010 at 21:49, Dirk Eddelbuettel wrote: | So I became a little more ambitious and made the runit file a fuller test of | ColDatum and RcppFrame (both of the old API): | | test.ColDatum.vector <- function() { | src <- 'std::vector colDatu

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-18 Thread Dirk Eddelbuettel
Hi Alistair, On 17 March 2010 at 06:55, Alistair Gee wrote: | On Tue, Mar 16, 2010 at 5:49 PM, Dirk Eddelbuettel wrote: | > | > On 16 March 2010 at 16:59, Alistair Gee wrote: | > | Here are patches to RcppFrame.h: | > | > Sweet!  Thanks a lot! | > | > Now, just to top it off, could provide a uni

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-17 Thread Douglas Bates
On Wed, Mar 17, 2010 at 8:55 AM, Alistair Gee wrote: > On Tue, Mar 16, 2010 at 5:49 PM, Dirk Eddelbuettel wrote: >> >> On 16 March 2010 at 16:59, Alistair Gee wrote: >> | Here are patches to RcppFrame.h: >> >> Sweet!  Thanks a lot! >> >> Now, just to top it off, could provide a unit test that wou

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-17 Thread Alistair Gee
On Tue, Mar 16, 2010 at 5:49 PM, Dirk Eddelbuettel wrote: > > On 16 March 2010 at 16:59, Alistair Gee wrote: > | Here are patches to RcppFrame.h: > > Sweet!  Thanks a lot! > > Now, just to top it off, could provide a unit test that would ideally trigger > the issue (or something related) pre-fix b

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-16 Thread Dirk Eddelbuettel
On 16 March 2010 at 16:59, Alistair Gee wrote: | Here are patches to RcppFrame.h: Sweet! Thanks a lot! Now, just to top it off, could provide a unit test that would ideally trigger the issue (or something related) pre-fix but not post-fix? Dirk | --- RcppFrame.h~2010-02-16 10:54:01

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-16 Thread Alistair Gee
Here are patches to RcppFrame.h: --- RcppFrame.h~2010-02-16 10:54:01.0 -0500 +++ RcppFrame.h 2010-03-16 19:48:29.847994574 -0400 @@ -30,7 +30,8 @@ enum ColType { // Supported data frame column types. COLTYPE_DOUBLE, COLTYPE_INT, COLTYPE_STRING, COLTYPE_FA

Re: [Rcpp-devel] ColDatum constructors memory safety

2010-03-13 Thread Dirk Eddelbuettel
Hi Alistair, Thanks for sharing the analysis. On 12 March 2010 at 15:15, Alistair Gee wrote: | The ColDatum default constructor does not initialize any fields except | for "level". But the ColDatum *copy* constructor expects the "type" | field to be properly initialized, b/c if type is COLTYPE_F