2011-12-05 23:31:31 +00:00
|
|
|
#!/bin/sh
|
2015-09-04 15:49:35 +00:00
|
|
|
|
2015-11-18 09:33:59 +00:00
|
|
|
CHECKERS="alpha.core.TestAfterDivZero
|
|
|
|
alpha.core.BoolAssignment
|
|
|
|
alpha.core.CastToStruct
|
|
|
|
alpha.core.FixedAddr
|
|
|
|
alpha.core.IdenticalExpr
|
|
|
|
alpha.core.PointerArithm
|
|
|
|
alpha.core.PointerSub
|
|
|
|
alpha.core.SizeofPtr
|
|
|
|
alpha.core.TestAfterDivZero
|
|
|
|
alpha.deadcode.UnreachableCode
|
|
|
|
alpha.security.ArrayBoundV2
|
|
|
|
alpha.security.MallocOverflow
|
|
|
|
alpha.security.ReturnPtrRange
|
|
|
|
alpha.security.taint.TaintPropagation
|
|
|
|
alpha.unix.Chroot
|
|
|
|
alpha.unix.PthreadLock
|
|
|
|
alpha.unix.SimpleStream
|
|
|
|
alpha.unix.cstring.BufferOverlap
|
|
|
|
alpha.unix.cstring.NotNullTerminated
|
|
|
|
alpha.unix.cstring.OutOfBounds
|
|
|
|
security.FloatLoopCounter
|
|
|
|
"
|
2015-09-04 15:49:35 +00:00
|
|
|
|
2015-11-18 09:33:59 +00:00
|
|
|
for a in ${CHECKERS} ; do
|
|
|
|
PLUGINS="${PLUGINS} -enable-checker $a"
|
|
|
|
done
|
2015-09-04 15:49:35 +00:00
|
|
|
|
2015-11-03 10:04:21 +00:00
|
|
|
if [ -z "${MAKE}" ]; then
|
|
|
|
MAKE=make
|
2015-11-09 21:28:21 +00:00
|
|
|
gmake --help >/dev/null 2>&1
|
2015-11-03 10:04:21 +00:00
|
|
|
[ $? = 0 ] && MAKE=gmake
|
2015-11-09 21:28:21 +00:00
|
|
|
export MAKE="${MAKE}"
|
2015-11-03 10:04:21 +00:00
|
|
|
fi
|
2012-08-30 16:06:18 +00:00
|
|
|
scan-build echo >/dev/null
|
|
|
|
[ $? = 0 ] || exit 1
|
2011-12-05 23:31:31 +00:00
|
|
|
|
|
|
|
# find root
|
|
|
|
cd `dirname $PWD/$0` ; cd ..
|
|
|
|
|
|
|
|
# build
|
2013-02-07 18:31:18 +00:00
|
|
|
${MAKE} mrproper > /dev/null 2>&1
|
|
|
|
rm -rf scan-log
|
2015-09-04 15:49:35 +00:00
|
|
|
scan-build ./configure --prefix=/usr
|
|
|
|
scan-build ${PLUGINS} -o ${PWD}/clang-log ${MAKE} -j 4
|
2011-12-05 23:31:31 +00:00
|
|
|
echo Check ${PWD}/clang-log
|