[R-pkg-devel] how to change from -fsanitize=undefined to -fsanitize=address
Youyi Fong
youy||ong @end|ng |rom gm@||@com
Fri Nov 29 18:58:01 CET 2019
Thanks. I was wondering how to do that within the context of docker
containers. In the tutorial
http://dirk.eddelbuettel.com/code/sanitizers.html, one calls the prebuilt
Rdevel:
# Rdevel CMD INSTALL sanitizers_0.1.0.tar.gz
and get
* installing to library '/usr/local/lib/R/site-library'
* installing *source* package 'sanitizers' ...
** package 'sanitizers' successfully unpacked and MD5 sums checked
** libs
g++-4.9 -fsanitize=address -I/usr/local/lib/R/include -DNDEBUG
-I/usr/local/include -fpic -pipe -Wall -pedantic -O3 -c
heap_address.cpp -o heap_address.o
g++-4.9 -fsanitize=address -I/usr/local/lib/R/include -DNDEBUG
-I/usr/local/include -fpic -pipe -Wall -pedantic -O3 -c
stack_address.cpp -o stack_address.o
g++-4.9 -fsanitize=address -shared -L/usr/local/lib/R/lib
-L/usr/local/lib -o sanitizers.so heap_address.o stack_address.o
-L/usr/local/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/sanitizers/libs
** R
** inst
But the same thing does not happen to me. I got -fsanitize=undefined
instead. I did try modifying Makevars, but it did not seem to have an
effect.
On Fri, Nov 29, 2019 at 9:48 AM Uwe Ligges <ligges using statistik.tu-dortmund.de>
wrote:
> See section 4.3.3 "Using the Address Sanitizer" in Writing R Extensions.
>
> Best,
> Uwe Ligges
>
> On 29.11.2019 17:58, Youyi Fong wrote:
> > Hello, I would like to reproduce this error locally:
> >
> https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-ASAN/chngpt/00check.log
> >
> > I followed the tutorial at
> http://dirk.eddelbuettel.com/code/sanitizers.html,
> > but what happened to me was not
> > g++-4.9 -fsanitize=address -I/usr/local/lib/R/include -DNDEBUG
> > -I/usr/local/include -fpic -pipe -Wall -pedantic -O3 -c
> > heap_address.cpp -o heap_address.o
> > but
> > g++-4.9 -fsanitize=undefined -I/usr/local/lib/R/include -DNDEBUG
> > -I/usr/local/include -fpic -pipe -Wall -pedantic -O3 -c
> > heap_address.cpp -o heap_address.o
> >
> > And when I test my package, chngpt, I was not able to reproduce the
> > error on CRAN. I am guessing that if change the compiler option from
> > -fsanitize=undefined to -fsanitize=address, I might be able to reproduce
> > the error. My question is how. Thanks!
> >
> > Youyi Fong
> >
> > --------------------------------------------------------------
> > Fred Hutchinson Cancer Research Center
> > Seattle, WA
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list