[R-pkg-devel] can't reproduce 'Additional issues' on CRAN with valgrind

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Mon Aug 2 20:00:30 CEST 2021


On Mon, 2 Aug 2021 17:11:14 +0000
Georgi Boshnakov <georgi.boshnakov using manchester.ac.uk> wrote:

> What am I missing? Do I need to have a separate library for the
> instrumented R-devel version?

It doesn't look to me like you're missing anything, unless you start
seeing the errors when you start `R -d valgrind` and then run the tests
from your package.

Perhaps AddressSanitizer would be more successful at catching this
particular error? It should be possible run -fsanitize=... shared
libraries with "unsanitized" executables by LD_PRELOAD'ing libasan.
What happens if you run the following?

LD_PRELOAD=libasan.so.3 \
 PKG_CXXFLAGS=-fsanitize=address PKG_LIBS=-fsanitize=address \
 R CMD check rbibutils_VERSION.tar.gz

AddressSanitizer used to have an error where it couldn't start up if
something called malloc() before its constructors had a chance to run,
but it's been fixed in 2017.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list