This is a slightly modified version of a patch from Ivo Raisr <ivosh@ivosh.net> git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13984