Skip to content

Examples for using Clang and GCC sanitizers: asan, lsan, tsan, ubsan, msan

License

Notifications You must be signed in to change notification settings

ornl-training/sanitizers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanitizers

Mini examples to illustrate the use of Clang and GCC sanitizers

Run tests with CMake

To run Address Sanitizers examples with CMake:

$ cd asan
$ mkdir build
$ cd build 
$ cmake ..
$ make -j 
$ ctest

To disable configuration with sanitizers modify the step above:

$ cmake -DENABLE_ASAN=OFF ..

To enable other sanitizers (e.g. TSAN):

$ cmake -DENABLE_TSAN=ON ..

To see verbose information modify the step above:

$ ctest -VV

Run tests with Meson

$ cd asan
$ mkdir build
$ cd build 
$ meson -Db_sanitize=address ..
$ ninja 
$ ninja test

About

Examples for using Clang and GCC sanitizers: asan, lsan, tsan, ubsan, msan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published