Workaround valgrind of python on x86_64:
authorjkratoch <>
Wed, 17 Mar 2010 17:07:46 +0000 (17:07 +0000)
committerjkratoch <>
Wed, 17 Mar 2010 17:07:46 +0000 (17:07 +0000)
  https://bugzilla.redhat.com/show_bug.cgi?id=500206#c3

.bashrc
.python.valgrind.patch [new file with mode: 0644]

diff --git a/.bashrc b/.bashrc
index a151d70..974d60c 100644 (file)
--- 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;' </usr/share/doc/python-devel-2.*/valgrind-python.supp >$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 (file)
index 0000000..c40f2a7
--- /dev/null
@@ -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.