-
Notifications
You must be signed in to change notification settings - Fork 101
Linux Apple run sanitize tests
AddressSanitizer is a fast memory error detector. It consists of a compiler instrumentation module and a run-time library. The tool can detect the following types of bugs:
-
Out-of-bounds accesses to heap, stack and globals
-
Use-after-free
-
Use-after-return (to some extent)
-
Double-free, invalid free
Typical slowdown introduced by AddressSanitizer is 2x.
Documentation is found here. This is built if clang has been included as per this document and is automatically available.
To run this checker :
cmake ../ -DCMAKE_CXX_FLAGS=-fsanitize=address-full (from your build directory)
Then run any or all tests that you wish to check for the above errors.
Assuming your build directory is MaidSafe/<build dir name>
then output of the sanity check can be de-mangled using :
./TESTsomething 2>&1 | ../tools/clang/asan_symbolize.py
ThreadSanitizer is a tool that detects data races. It consists of a compiler instrumentation module and a run-time library. Typical slowdown introduced by ThreadSanitizer is about 5x-15x. Typical memory overhead introduced by ThreadSanitizer is about 5x-10x.
Documentation is found here. This is built if clang has been included as per this document and is automatically available.
To run this checker :
cmake ../ -DCMAKE_CXX_FLAGS=-fsanitize=thread (from your build directory)
Then run any or all tests that you wish to check for the above errors.
Assuming your build directory is MaidSafe/<build dir name>
then output of the sanity check can be de-mangled using :
./TESTsomething 2>&1 | ../tools/clang/asan_symbolize.py
MemorySanitizer is a detector of uninitialized reads. It consists of a compiler instrumentation module and a run-time library.
Typical slowdown introduced by MemorySanitizer is 3x.
Documentation is found here. This is built if clang has been included as per this document and is automatically available.
To run this checker :
cmake ../ -DCMAKE_CXX_FLAGS=-fsanitize=memory (from your build directory)
Then run any or all tests that you wish to check for the above errors.
Assuming your build directory is MaidSafe/<build dir name>
then output of the sanity check can be de-mangled using :
./TESTsomething 2>&1 | ../tools/clang/asan_symbolize.py
To run this checker :
cmake ../ -DCMAKE_CXX_FLAGS=-fsanitize=undefined (from your build directory)
Then run any or all tests that you wish to check for the above errors.
Assuming your build directory isMaidSafe/<build dir name>
then output of the sanity check can be de-mangled using :
./TESTsomething 2>&1 | ../tools/clang/asan_symbolize.py
MaidSafe Meta Library
- Home
- Build Instructions for Linux
- Build Instructions for OS X
- Build Instructions for Windows
- Dashboard
- Issues
- Code Standards
MaidSafe Project
- MaidSafe
- MaidSafe-API
- MaidSafe-Common
- MaidSafe-Passport
- MaidSafe-RUDP
- MaidSafe-Routing
- MaidSafe-Encrypt
- MaidSafe-Drive
- MaidSafe-Network-Filesystem
- MaidSafe-Vault
- MaidSafe-Vault-Manager
MaidSafe Papers