aboutsummaryrefslogtreecommitdiff
path: root/scripts/test/scan-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/test/scan-build.sh')
-rw-r--r--scripts/test/scan-build.sh28
1 files changed, 10 insertions, 18 deletions
diff --git a/scripts/test/scan-build.sh b/scripts/test/scan-build.sh
index 623b227fe4..36e69e6d00 100644
--- a/scripts/test/scan-build.sh
+++ b/scripts/test/scan-build.sh
@@ -3,12 +3,9 @@
# See LICENSE for licensing information
#
# This script is used for running a bunch of clang scan-build checkers
-# on Tor.
-#
-# It has hardwired paths for Nick's desktop at the moment.
+# on Tor.
CHECKERS="\
- --use-analyzer=/opt/clang-3.4/bin/clang \
-disable-checker deadcode.DeadStores \
-enable-checker alpha.core.CastSize \
-enable-checker alpha.core.CastToStruct \
@@ -22,28 +19,23 @@ CHECKERS="\
-enable-checker alpha.unix.cstring.NotNullTerminated \
-enable-checker alpha.unix.cstring.OutOfBounds \
-enable-checker alpha.core.FixedAddr \
- -enable-checker security.insecureAPI.strcpy
+ -enable-checker security.insecureAPI.strcpy \
+ -enable-checker alpha.unix.PthreadLock \
+ -enable-checker alpha.core.PointerArithm \
+ -enable-checker alpha.core.TestAfterDivZero \
"
-/opt/clang-3.4/bin/scan-build/scan-build \
+scan-build \
$CHECKERS \
- --use-analyzer=/opt/clang-3.4/bin/clang \
./configure
-/opt/clang-3.4/bin/scan-build/scan-build \
+scan-build \
$CHECKERS \
- --use-analyzer=/opt/clang-3.4/bin/clang \
- make -j2
-
+ make -j2 -k
-# Haven't tried this yet.
-# -enable-checker alpha.unix.PthreadLock
# This one gives a false positive on every strcmp.
# -enable-checker alpha.core.PointerSub
-# This one hates it when we stick a nonzero const in a pointer.
-# -enable-checker alpha.core.FixedAddr
-
-# This one crashes sometimes for me.
-# -enable-checker alpha.deadcode.IdempotentOperations
+# Needs work
+# alpha.unix.MallocWithAnnotations ??