Skip to content

Commit

Permalink
cicada/libinjection_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
client9 committed Apr 13, 2014
1 parent 9c102bf commit 7185140
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 38 deletions.
2 changes: 1 addition & 1 deletion cicada/libinjection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
'libinjection-clang-static-analyzer': {
'listen' : LISTEN,
'source' : CheckoutGit('https://github.com/client9/libinjection.git', 'libinjection'),
'exec' : ExecuteShell('clang --version && cd libinjection && ./autogen.sh && cd src && ./clang-static-analyzer.sh'),
'exec' : ExecuteShell('cd libjinection && ./run-clang-static-analyzer.sh'),
'publish': [
PublishArtifact('console.txt', PUBDIR, 'console.txt', 'console'),
]
Expand Down
39 changes: 39 additions & 0 deletions run-clang-static-analyzer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
clang --version

./autogen.sh
scan-build ./configure
cd src
scan-build --status-bugs \
-enable-checker alpha.core.BoolAssignment \
-enable-checker alpha.core.CastSize \
-enable-checker alpha.core.CastToStruct \
-enable-checker alpha.core.FixedAddr \
-enable-checker alpha.core.PointerArithm \
-enable-checker alpha.core.SizeofPtr \
-enable-checker alpha.deadcode.IdempotentOperations \
-enable-checker alpha.deadcode.UnreachableCode \
-enable-checker alpha.security.ArrayBound \
-enable-checker alpha.security.MallocOverflow \
-enable-checker alpha.security.ReturnPtrRange \
-enable-checker alpha.unix.cstring.BufferOverlap \
-enable-checker alpha.unix.cstring.OutOfBounds \
-enable-checker security.FloatLoopCounter \
-enable-checker security.insecureAPI.rand \
make testdriver

# notes 2013-10-24

# do not understand
# -no-failure-reports

# seems broken or I don't understand it
# -enable-checker alpha.core.PointerSub

#
# probably good.. used in testdriver as a hack
#-enable-checker security.insecureAPI.strcpy

# has problem with "backwards array iteration"
# used in is_backslash_escaped
#-enable-checker alpha.security.ArrayBoundV2
37 changes: 0 additions & 37 deletions src/clang-static-analyzer.sh

This file was deleted.

0 comments on commit 7185140

Please sign in to comment.