[Rd] debug package calling C++ code using valgrind

mullahmohammedomar ingobulla at gmail.com
Mon Jan 14 19:07:51 CET 2013


Hi,

I am trying to debug a package which I helped to develop since we were
notified by CRAN that our package randomly fails to run its examples. Hence,
I reinstalled R with "with-valgrind-instrumentation=2" and installed our
package with 

MAKEFLAGS="CFLAGS='-O0 -g3' CXXFLAGS='-O0 -g3'" R CMD INSTALL --build hsmm

Then, I ran the examples of our package with

R -d "valgrind --tool=memcheck" --vanilla < hsmm.Rcheck/hsmm-Ex.R

and got the following output:  out.txt
<http://r.789695.n4.nabble.com/file/n4655507/out.txt>  

Unfortunately, this does not match the error messages from valgrind we were
provided by CRAN:  hsmm-Ex.Rout
<http://r.789695.n4.nabble.com/file/n4655507/hsmm-Ex.Rout>  

In particular, the run by CRAN yielded lots of accesses to uninitialized
variables within the C++ code of the package, whereas I do not get any error
message with regards to the C++ code.

Does anyone know what I am doing wrong?




--
View this message in context: http://r.789695.n4.nabble.com/debug-package-calling-C-code-using-valgrind-tp4655507.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list