mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Add valgrind and ubsan suppressions
This commit is contained in:
parent
881add341f
commit
c1e00bf97a
3 changed files with 67 additions and 4 deletions
|
|
@ -259,7 +259,7 @@ AC_ARG_ENABLE([coverage],
|
||||||
AC_ARG_ENABLE([valgrind],
|
AC_ARG_ENABLE([valgrind],
|
||||||
[AS_HELP_STRING([--enable-valgrind],[enable the use of valgrind in testing])],
|
[AS_HELP_STRING([--enable-valgrind],[enable the use of valgrind in testing])],
|
||||||
[
|
[
|
||||||
TESTENV="$VALGRIND --leak-check=full --error-exitcode=1"
|
TESTENV="$VALGRIND --leak-check=full --suppressions=valgrind.supp --error-exitcode=1"
|
||||||
FAILENV="$VALGRIND --error-exitcode=1"
|
FAILENV="$VALGRIND --error-exitcode=1"
|
||||||
CFLAGS="$CFLAGS -DCHECKER"
|
CFLAGS="$CFLAGS -DCHECKER"
|
||||||
MEMORY_CHECKER=1
|
MEMORY_CHECKER=1
|
||||||
|
|
@ -279,7 +279,7 @@ AC_ARG_ENABLE([sgcheck],
|
||||||
AC_ARG_ENABLE([helgrind],
|
AC_ARG_ENABLE([helgrind],
|
||||||
[AS_HELP_STRING([--enable-helgrind],[enable the use of helgrind in testing])],
|
[AS_HELP_STRING([--enable-helgrind],[enable the use of helgrind in testing])],
|
||||||
[
|
[
|
||||||
TESTENV="$VALGRIND --tool=helgrind --fair-sched=try --error-exitcode=1"
|
TESTENV="$VALGRIND --tool=helgrind --suppressions=valgrind.supp --fair-sched=try --error-exitcode=1"
|
||||||
FAILENV="$TESTENV"
|
FAILENV="$TESTENV"
|
||||||
CFLAGS="$CFLAGS -DCHECKER"
|
CFLAGS="$CFLAGS -DCHECKER"
|
||||||
THREAD_CHECKER=1
|
THREAD_CHECKER=1
|
||||||
|
|
@ -289,7 +289,7 @@ AC_ARG_ENABLE([helgrind],
|
||||||
AC_ARG_ENABLE([drd],
|
AC_ARG_ENABLE([drd],
|
||||||
[AS_HELP_STRING([--enable-drd],[enable the use of drd in testing])],
|
[AS_HELP_STRING([--enable-drd],[enable the use of drd in testing])],
|
||||||
[
|
[
|
||||||
TESTENV="$VALGRIND --tool=drd --fair-sched=try --error-exitcode=1"
|
TESTENV="$VALGRIND --tool=drd --suppressions=valgrind.supp --fair-sched=try --error-exitcode=1"
|
||||||
FAILENV="$TESTENV"
|
FAILENV="$TESTENV"
|
||||||
CFLAGS="$CFLAGS -DCHECKER"
|
CFLAGS="$CFLAGS -DCHECKER"
|
||||||
THREAD_CHECKER=1
|
THREAD_CHECKER=1
|
||||||
|
|
@ -315,7 +315,7 @@ AC_ARG_ENABLE([msan],
|
||||||
AC_ARG_ENABLE([ubsan],
|
AC_ARG_ENABLE([ubsan],
|
||||||
[AS_HELP_STRING([--enable-ubsan],[enable the use of UndefinedBehaviourSanitizer in testing])],
|
[AS_HELP_STRING([--enable-ubsan],[enable the use of UndefinedBehaviourSanitizer in testing])],
|
||||||
[
|
[
|
||||||
CFLAGS="$CFLAGS -DCHECKER -fsanitize=undefined"
|
CFLAGS="$CFLAGS -DCHECKER -fsanitize=undefined -fno-sanitize=function"
|
||||||
MEMORY_CHECKER=1
|
MEMORY_CHECKER=1
|
||||||
],
|
],
|
||||||
[])
|
[])
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ make distclean
|
||||||
|
|
||||||
cd $DEST
|
cd $DEST
|
||||||
|
|
||||||
|
cp $SOURCE/valgrind.supp $DEST
|
||||||
|
|
||||||
# Coverage
|
# Coverage
|
||||||
if ! $SOURCE/configure --enable-coverage --enable-sde; then
|
if ! $SOURCE/configure --enable-coverage --enable-sde; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,64 @@
|
||||||
fun:printf
|
fun:printf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Ignore races in pthread functions implemented in /lib64/libc-2.42.so
|
||||||
|
# Keeps helgrind and drd quiet for internal GLIBC synchronization,
|
||||||
|
# but still reports races in user code.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_pthread_mutex_lock
|
||||||
|
Helgrind:Race
|
||||||
|
fun:pthread_mutex_lock*
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_pthread_mutex_unlock
|
||||||
|
Helgrind:Race
|
||||||
|
fun:pthread_mutex_unlock*
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_pthread_cond_wait
|
||||||
|
Helgrind:Race
|
||||||
|
...
|
||||||
|
fun:pthread_cond_wait*
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_pthread_cond_signal
|
||||||
|
Helgrind:Race
|
||||||
|
fun:pthread_cond_signal*
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_pthread_cond_broadcast
|
||||||
|
Helgrind:Race
|
||||||
|
fun:pthread_cond_broadcast*
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_pthread_join
|
||||||
|
Helgrind:Race
|
||||||
|
...
|
||||||
|
fun:pthread_join*
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_thread_start
|
||||||
|
Helgrind:Race
|
||||||
|
fun:start_thread
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_set_vma_name
|
||||||
|
Helgrind:Race
|
||||||
|
fun:__set_vma_name
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
glibc_name_stack_maps
|
||||||
|
drd:ConflictingAccess
|
||||||
|
fun:name_stack_maps
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue