diff options
author | teor <teor2345@gmail.com> | 2015-06-06 04:04:23 +1000 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2015-06-06 04:04:23 +1000 |
commit | bc0a9843e5cd8ed407e79d7f7e7b5404210924c4 (patch) | |
tree | d81f9ab006aa5447709727160167189639cda00b /doc/HACKING | |
parent | 2f67a6e8c95aadadfc55b6245668471f7def72e6 (diff) | |
download | tor-bc0a9843e5cd8ed407e79d7f7e7b5404210924c4.tar.gz tor-bc0a9843e5cd8ed407e79d7f7e7b5404210924c4.zip |
Add instructions for clang sanitizers, static analyzer, and coverity
Document use of coverity, clang static analyzer, and clang dynamic
undefined behavior and address sanitizers in doc/HACKING.
Add clang dynamic sanitizer blacklist in
contrib/clang/sanitizer_blacklist.txt to exempt known undefined
behavior. Include detailed usage instructions in this blacklist file.
Patch by "teor".
Diffstat (limited to 'doc/HACKING')
-rw-r--r-- | doc/HACKING | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/HACKING b/doc/HACKING index 0d78f797fc..511e3fbe41 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -115,6 +115,32 @@ valgrind --leak-check=yes --error-limit=no --show-reachable=yes src/or/tor pass --undef-value-errors=no to valgrind, or rebuild your openssl with -DPURIFY.) +Coverity +~~~~~~~~ + +Nick regularly runs the coverity static analyzer on the Tor codebase. + +The preprocessor define __COVERITY__ is used to work around instances +where coverity picks up behavior that we wish to permit. + +clang Static Analyzer +~~~~~~~~~~~~~~~~~~~~~ + +The clang static analyzer can be run on the Tor codebase using Xcode (WIP) +or a command-line build. + +The preprocessor define __clang_analyzer__ is used to work around instances +where clang picks up behavior that we wish to permit. + +clang Runtime Sanitizers +~~~~~~~~~~~~~~~~ + +To build the Tor codebase with the clang Address and Undefined Behavior +sanitizers, see the file contrib/clang/sanitize_blacklist.txt. + +Preprocessor workarounds for instances where clang picks up behavior that +we wish to permit are also documented in the blacklist file. + Running lcov for unit test coverage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |