Closed brodieG closed 6 years ago
I believe this is caused by the ALTREP functionality now in R-devel. One of the impacts of ALTREP is that some functions that previously did not allocate do now. STRING_ELT()
is one such function.
Yes, it will probably work with the trunk of rchk which has been updated for ALTREP, but the image uses an older version. I am now updating the image.
I've updated rchk image, now it uses LLVM4.0 and the (now) most recent version of rchk. Your example package seems to be working (STRING_ELT
does not allocate, so no error is reported).
I'm not 100% certain this is a spurious error, but I'm guessing it is. In:
I get:
presumably because it is not recognized
x_prev
is pointing to aCHARSXP
that is protected by virtue of being a member of the input to the function (in my casex
is provided via.Call
).This is a simplified example. In my actual use case I'm keeping track of the previous
CHARSXP
in a loop.I'm not sure it's worth the trouble to fix this, but figured having the info could still be useful to you. Of course, there is the possibility I'm wrong about this.
Sample package on github