Package: sanitizers 0.1.1

sanitizers: C/C++ Source Code to Trigger Address and Undefined Behaviour Sanitizers

Recent gcc and clang compiler versions provide functionality to test for memory violations and other undefined behaviour; this is often referred to as "Address Sanitizer" (or 'ASAN') and "Undefined Behaviour Sanitizer" ('UBSAN'). The Writing R Extension manual describes this in some detail in Section 4.3 title "Checking Memory Access". . This feature has to be enabled in the corresponding binary, eg in R, which is somewhat involved as it also required a current compiler toolchain which is not yet widely available, or in the case of Windows, not available at all (via the common Rtools mechanism). . As an alternative, pre-built Docker containers such as the Rocker container 'r-devel-san' or the multi-purpose container 'r-debug' can be used. . This package then provides a means of testing the compiler setup as the known code failures provides in the sample code here should be detected correctly, whereas a default build of R will let the package pass. . The code samples are based on the examples from the Address Sanitizer Wiki at <>.

Authors:Dirk Eddelbuettel

sanitizers.pdf |sanitizers.html
sanitizers/json (API)

# Install sanitizers in R:
install.packages('sanitizers', repos = c('', ''))

Peer review:

Bug tracker:

Uses libs:
  • c++– GNU Standard C++ Library v3


3 exports 8 stars 1.65 score 0 dependencies 217 downloads

Last updated 10 days agofrom:68fde939fe8c94dbb49b59491c983efb2f003070



Readme and manuals

Help Manual

Help pageTopics
C/C++ Source Code to Trigger Address and Undefined Behaviour Sanitizerssanitizers-package heapAddressSanitize intOverflowSanitize sanitizers stackAddressSanitize