[R-pkg-devel] Getting started with memory debugging
Michael Chirico
mich@elchirico4 @ending from gm@il@com
Mon Jan 14 02:48:20 CET 2019
Hello all,
I'm getting started doing some debugging of memory errors and got stuck
trying to reproduce the errors found during my CRAN submission process:
https://cran.r-project.org/web/checks/check_results_geohashTools.html
Starting with the clang-ASAN issues, my approach was to try and use the
rocker/r-devel-san image.
Launching with the package directory mounted via:
docker run --rm -it -v
/Users/michael.chirico/github/geohashTools/:/home/docker/geohashTools
rocker/r-devel-san /bin/bash
Building required libraries:
apt-get update
apt-get install libgdal-dev libudunits2-dev
Then installing my Imports/Suggests:
Rscript -e "install.packages(c('Rcpp', 'sp', 'sf', 'testthat', 'mockery'))"
Now attempting to reproduce the memory errors:
cd /home/docker/geohashTools
RD CMD build .
RD CMD check geohashTools_0.2.0.tar.gz
But this is check is successful (I was hoping it'd fail)... I assume the
problem is from the last few steps. The manual says:
>
> It requires code to have been compiled and linked with -fsanitize=address
But I'm not sure how to enforce this (I assumed it was being handled by how
RD binary is built but I didn't notice any compilation output from R CMD
build .
Any help on getting started here would be appreciated :)
Michael Chirico
PS the source can be found at https://github.com/MichaelChirico/geohashTools
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list