-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
My package "bindrcpp" provides a C++ interface via // [[Rcpp::interfaces(cpp)]]
. I was able to track down spurious segmentation faults (in dplyr, tidyverse/dplyr#2811) to (what I think is) a protection error in the auto-generated C++ wrappers for these interfaces.
The commit krlmlr/bindrcpp@6d1e2bd shows both the problem and the solution: In general, wrap()
will perform allocation of R objects, and without extra shielding these can be garbage collected even before the wrapped function is called, because the latter has all SEXP
in its signature.
After applying this particular commit, I'm not seeing test failures anymore, which before occurred after a few iterations. Happy to submit a PR.
CC @lionel-.
Metadata
Metadata
Assignees
Labels
No labels