[Rcpp-devel] problems while upgrading to Rcpp 0.11.2

Pratibha Rana prana at Vertica.com
Thu Sep 4 14:57:57 CEST 2014

I tried with the create() as well and I had the same issue, so I just
tried to simplify the code as much as possible to get down to the root.
It was not just the dataframe, function execution was also causing
problem. Here is another snippet which was causing the segfault. Again
just adding the -O2 flag resolved the issue. It doesn't make any sense
but seems to resolve the issue.

bool exist(const string lstname, RInside &R)

    Function exists = R.parseEval("exists");
    LogicalVector result = exists(lstname);  <<------This line was causing the segfault, if I changed this to "LogicalVector result= R.parseEval("exists(lstname")); " it worked fine.

    return result[0];


On 09/04/2014 08:37 AM, Dirk Eddelbuettel wrote:
> On 4 September 2014 at 12:13, Pratibha Rana wrote:
> | For me the -O2 flag did the trick. I verified it multiple times. Just remove
> | the -O2 and the code segfaults while initializing RInside, add the -O2 flag and
> | everybody is happy. It is weird.
> Makes no sense, apart from maybe revealing a race condition somewhere which ...
> | I cannot reproduce it independently of RInside because the segfault occurs when
> | RInside is being initialized as told by the backtrace of the core. Also I can't
> | reproduce if I don't use a DataFrame. rinside_sample0 works just fine, but if I
> ... could be because you should not have an empty DataFrame there anyway.  
> A DataFrame is just a list of vectors of different types and has little sense
> in an by itself. We almost always create them via the DateFrame::create()
> mechanism anyway.
> | add a dataframe then the same segfault pops back.
> Don't get carried away over the DataFrame issue. 
> On the margin, I think that is misuse on your end.
> Dirk

More information about the Rcpp-devel mailing list