/usr/share/sagemath/bin/sage-valgrind is in sagemath-common 7.4-9.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/env bash
SUPP=""
if [ -f "$SAGE_EXTCODE/valgrind/python.supp" ]; then
SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/python.supp"
else
echo "Python suppressions not found (not installed?), skipping"
fi
SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/pyalloc.supp"
SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/sage.supp"
SUPP+=" --suppressions=$SAGE_EXTCODE/valgrind/sage-additional.supp"
MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25 $SUPP"
if [ "$SAGE_MEMCHECK_FLAGS" ]; then
echo "Overwriting memcheck flags with: $SAGE_MEMCHECK_FLAGS"
MEMCHECK_FLAGS=$SAGE_MEMCHECK_FLAGS
else
echo "Using default flags: $MEMCHECK_FLAGS"
fi
valgrind --tool=memcheck $MEMCHECK_FLAGS python "$SAGE_SCRIPTS_DIR/sage-ipython" "$@" -i
|