Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #15586: Update Valgrind to 3.10.0
New version is out. Use git branch and tarball at: * http://sage.sagedev.org/home/vbraun/upstream/valgrind-3.10.0.tar.bz2 URL: http://trac.sagemath.org/15586 Reported by: jpflori Ticket author(s): Jean-Pierre Flori, Volker Braun Reviewer(s): Jeroen Demeyer
- Loading branch information
Showing
10 changed files
with
645 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
= Valgrind = | ||
|
||
== Description == | ||
|
||
This is an optional spkg. It supports Linux on x86, x86-64, ppc, ppc64 and ARM | ||
as well as Darwin (Mac OS X 10.5 and 10.6) on x86 and x86-64. | ||
|
||
Valgrind is an instrumentation framework for building dynamic analysis tools. | ||
There are Valgrind tools that can automatically detect many memory management | ||
and threading bugs, and profile your programs in detail. You can also use | ||
Valgrind to build new tools. | ||
|
||
The Valgrind distribution currently includes six production-quality tools: | ||
a memory error detector, two thread error detectors, a cache and | ||
branch-prediction profiler, a call-graph generating cache and branch-prediction | ||
profiler, and a heap profiler. It also includes three experimental tools: a | ||
heap/stack/global array overrun detector, a second heap profiler that examines | ||
how heap blocks are used, and a SimPoint basic block vector generator. It runs | ||
on the following platforms: X86/Linux, AMD64/Linux, ARM/Linux, PPC32/Linux, | ||
PPC64/Linux, S390X/Linux, ARM/Android (2.3.x), X86/Darwin and AMD64/Darwin | ||
(Mac OS X 10.6 and 10.7). | ||
|
||
== License == | ||
|
||
Valgrind is Open Source / Free Software, and is freely available under the | ||
GNU General Public License, version 2. | ||
|
||
== SPKG Maintainers == | ||
|
||
* Tim Dumol | ||
* Ivan Andrus | ||
|
||
== Upstream Contact == | ||
|
||
* http://www.valgrind.org/ | ||
* valgrind-user, valgrind-devel mailing lists | ||
|
||
== Dependencies == | ||
|
||
* None | ||
|
||
== Special Build Instructions == | ||
|
||
* To build on OS X, you need to use Apple's compiler. FSF GCC is unsupported. | ||
|
||
=== Patches === | ||
|
||
* None. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tarball=valgrind-VERSION.tar.bz2 | ||
sha1=aec0b8cd042ec36c8cce4f6027b98627ab202f26 | ||
md5=7c311a72a20388aceced1aa5573ce970 | ||
cksum=968601795 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z "$SAGE_LOCAL" ] ; then | ||
echo >&2 "Error - SAGE_LOCAL undefined ... exiting" | ||
echo >&2 "Maybe run 'sage -sh'?" | ||
exit 1 | ||
fi | ||
|
||
cd src/ | ||
|
||
$MAKE regtest | ||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error testing Valgrind" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z "$SAGE_LOCAL" ] ; then | ||
echo >&2 "Error - SAGE_LOCAL undefined ... exiting" | ||
echo >&2 "Maybe run 'sage -sh'?" | ||
exit 1 | ||
fi | ||
|
||
cd src/ | ||
|
||
for patch in ../patches/*.patch; do | ||
[ -f "$patch" ] || continue | ||
patch -p1 <"$patch" | ||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error applying '$patch'" | ||
exit 1 | ||
fi | ||
done | ||
|
||
./configure --prefix=$SAGE_LOCAL | ||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error configuring Valgrind" | ||
exit 1 | ||
fi | ||
|
||
$MAKE | ||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error building Valgrind" | ||
exit 1 | ||
fi | ||
|
||
$MAKE install | ||
if [ $? -ne 0 ]; then | ||
echo >&2 "Error installing Valgrind" | ||
exit 1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# We reuse the gdb pythonstartup script. | ||
PYTHONSTARTUP=$SAGE_ROOT/local/bin/sage-ipython | ||
export PYTHONSTARTUP | ||
echo $PYTHONSTARTUP | ||
if [ ! -d "$DOT_SAGE/valgrind" ]; then | ||
mkdir "$DOT_SAGE/valgrind" | ||
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" | ||
|
||
LOG="$DOT_SAGE"/valgrind/sage-memcheck.%p | ||
echo "Log file is $LOG" | ||
MEMCHECK_FLAGS="--leak-resolution=high --leak-check=full --num-callers=25 $SUPP" | ||
|
||
MEMCHECK_FLAGS="--leak-resolution=high --log-file=$LOG --leak-check=full --num-callers=25 --suppressions=$SAGE_LOCAL/lib/valgrind/sage.supp "; export MEMCHECK_FLAGS | ||
if [ "$SAGE_MEMCHECK_FLAGS" ]; then | ||
echo "Overwriting memcheck flags with:" | ||
echo $SAGE_MEMCHECK_FLAGS | ||
MEMCHECK_FLAGS=$SAGE_MEMCHECK_FLAGS; export MEMCHECK_FLAGS | ||
echo "Overwriting memcheck flags with: $SAGE_MEMCHECK_FLAGS" | ||
MEMCHECK_FLAGS=$SAGE_MEMCHECK_FLAGS | ||
else | ||
echo "Using default flags:" | ||
echo $MEMCHECK_FLAGS | ||
echo "Using default flags: $MEMCHECK_FLAGS" | ||
fi | ||
|
||
valgrind --tool=memcheck $MEMCHECK_FLAGS python -i | ||
valgrind --tool=memcheck $MEMCHECK_FLAGS python "$SAGE_LOCAL/bin/sage-ipython" "$@" -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Read Misc/README.valgrind in the Python sourcs for a thorough explanation | ||
# | ||
# In short: We need these unless we compile python without pyalloc, | ||
# but that would be prohibitively slow. | ||
|
||
# Upstream has these commented out in python.supp: | ||
|
||
{ | ||
ADDRESS_IN_RANGE/Invalid read of size 4 | ||
Memcheck:Addr4 | ||
fun:PyObject_Free | ||
} | ||
|
||
{ | ||
ADDRESS_IN_RANGE/Invalid read of size 4 | ||
Memcheck:Value4 | ||
fun:PyObject_Free | ||
} | ||
|
||
{ | ||
ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value | ||
Memcheck:Cond | ||
fun:PyObject_Free | ||
} | ||
|
||
{ | ||
ADDRESS_IN_RANGE/Invalid read of size 4 | ||
Memcheck:Addr4 | ||
fun:PyObject_Realloc | ||
} | ||
|
||
{ | ||
ADDRESS_IN_RANGE/Invalid read of size 4 | ||
Memcheck:Value4 | ||
fun:PyObject_Realloc | ||
} | ||
|
||
{ | ||
ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value | ||
Memcheck:Cond | ||
fun:PyObject_Realloc | ||
} | ||
|
||
|
||
# These also happen in Python 2.7.8, pretty sure they are just pyalloc | ||
# artifacts as well: | ||
|
||
{ | ||
Spurious "Use of uninitialised value of size 8" | ||
Memcheck:Value8 | ||
fun:PyObject_Free | ||
} | ||
|
||
{ | ||
Spurious "Use of uninitialised value of size 8" | ||
Memcheck:Value8 | ||
fun:PyObject_Realloc | ||
} |
Oops, something went wrong.