-
-
Notifications
You must be signed in to change notification settings - Fork 221
Closed
Description
From https://github.com/kalibera/rprotect:
maacheck
This tool is quite simple and only reports instances of multiple allocating arguments pattern, such as (from Rcpp code):
Rf_lang2(::Rf_install("simpleError"), Rf_mkString(str.c_str()))
This is a real error: Rf_mkString returns an unprotected newly allocated object. Rf_install may allocate and may be called after Rf_mkString, and hence may trigger garbage collection that will corrupt the object allocated by Rf_mkString.
The associated fix needs to occur here:
Rcpp/inst/include/Rcpp/exceptions.h
Line 294 in e81493b
| Rcpp::Shield<SEXP> simpleErrorExpr( Rf_lang2(::Rf_install("simpleError"), Rf_mkString(str.c_str())) ); |
Metadata
Metadata
Assignees
Labels
No labels