[R-pkg-devel] Notes from rchk on hdf5r package

Holger Hoefling hhoeflin @ending from gm@il@com
Sun Sep 30 18:09:31 CEST 2018


Hi all,

I have been submitting a bug-fix version of a package and was alerted
to some notes that rchk brought up for it.

A link to the notes

https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/hdf5r.out

and to the version of the code the package refers to

https://github.com/cran/hdf5r/blob/master/src/convert.c


To be more specific:

The errors are more specific about usage of Rf_lang2 and Rf_lang1. I
am not very familiar with them and would appreciate some guidance on
how to fix.

Example

Suspicious call (two or more unprotected arguments) to Rf_lang2 at
H5ToR_Post_REFERENCE hdf5r/src/convert.c:1140

Code: SEXP hdf5r_ns = PROTECT(eval(lang2(install("getNamespace"), mkString("
hdf5r")), R_GlobalEnv));

I assume this can be fixed by wrapping the "install" and "mkString" in
an additional PROTECT? Is this what it is complaining about?


The other:

calling allocating function Rf_eval with argument allocated using
Rf_lang3(S:set_ref.H5R,?,?) hdf5r/src/convert.c:1141

Code:

eval(lang3(install("set_ref.H5R"), result, _Robj), hdf5r_ns);

I remember cobbling these parts together off of the internet and don't
understand enough about the internals of R functions to know what is
going wrong and how to fix.


Any help anyone can offer would be appreciated.


Thank you!


Holger

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list