[R-pkg-devel] debugging memory errors

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed Nov 6 21:40:44 CET 2019


On Wed, 6 Nov 2019 08:43:50 -0600
Marcin Jurek <marcinjurek1988 using gmail.com> wrote:

> I have very little clue what to do, above all because I don't know
> how to reproduce the error.

Using AddressSanitizer to find memory errors in R packages requires the
R installation to be built with AddressSanitizer, too.

I found it useful to build the package with -g (and maybe -Og), then
run the checks using `R -d valgrind CMD check ...`. Sometimes the
errors found by Valgrind are different from errors found by
AddressSanitizer, though (not to mention the differences in hardware).

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list