[R-pkg-devel] how to change from -fsanitize=undefined to -fsanitize=address

Uwe Ligges ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de
Fri Nov 29 18:49:00 CET 2019


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
>



More information about the R-package-devel mailing list