From: jkratoch <> Date: Wed, 17 Mar 2010 17:07:46 +0000 (+0000) Subject: Workaround valgrind of python on x86_64: X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=663f636cb8d84fc019047fbe6747b75e30a659c2 Workaround valgrind of python on x86_64: https://bugzilla.redhat.com/show_bug.cgi?id=500206#c3 --- diff --git a/.bashrc b/.bashrc index a151d70..974d60c 100644 --- a/.bashrc +++ b/.bashrc @@ -386,7 +386,7 @@ function rpmsrclist | sort -u fi } -function valgrind {(unset valgrind;s=~/.python.valgrind;perl -e 'undef $/;$_=<>;1 while s/^(?:###)?({\n)(?:###)?( *ADDRESS_IN_RANGE.*\n(?:[^}#].*\n)*)###/$1$2/gm;print;' $s;valgrind --suppressions=$s "$@";);} +function valgrind {(set -e;unset valgrind;s=~/.python.valgrind;rm -f $s;cp -p /usr/share/doc/python-devel-2.*/valgrind-python.supp $s;patch $s <$s.patch;perl -i -e 'undef $/;$_=<>;1 while s/^(?:###)?({\n)(?:###)?( *ADDRESS_IN_RANGE.*\n(?:[^}#].*\n)*)###/$1$2/gm;print;' $s;valgrind --suppressions=$s "$@";);} function yumupdate { yum makecache;yum -y --skip-broken update; } ulimit -S -c 0 diff --git a/.python.valgrind.patch b/.python.valgrind.patch new file mode 100644 index 0000000..c40f2a7 --- /dev/null +++ b/.python.valgrind.patch @@ -0,0 +1,63 @@ +--- /usr/share/doc/python-devel-2.6/valgrind-python.supp-orig 2008-08-24 07:04:52.000000000 +0200 ++++ /usr/share/doc/python-devel-2.6/valgrind-python.supp-orig 2009-05-11 22:12:53.000000000 +0200 +@@ -131,36 +131,60 @@ + ###} + ### + ###{ + ### ADDRESS_IN_RANGE/Invalid read of size 4 + ### Memcheck:Value4 + ### fun:PyObject_Free + ###} + ### + ###{ ++### ADDRESS_IN_RANGE/Invalid read of size 8 ++### Memcheck:Addr8 ++### fun:PyObject_Free ++###} ++### ++###{ ++### ADDRESS_IN_RANGE/Invalid read of size 8 ++### Memcheck:Value8 ++### 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/Invalid read of size 8 ++### Memcheck:Addr8 ++### fun:PyObject_Realloc ++###} ++### ++###{ ++### ADDRESS_IN_RANGE/Invalid read of size 8 ++### Memcheck:Value8 ++### fun:PyObject_Realloc ++###} ++### ++###{ + ### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value + ### Memcheck:Cond + ### fun:PyObject_Realloc + ###} + + ### + ### All the suppressions below are for errors that occur within libraries + ### that Python uses. The problems to not appear to be related to Python's + ### use of the libraries.