Python under valgrind
Hrvoje Niksic wrote:
A friend pointed out that running python under valgrind (simply "valgrind python") produces a lot of "invalid read" errors. Reading up on Misc/README.valgrind only seems to describe why "uninitialized reads" should occur, not invalid ones. For example: [...] I suppose valgrind could be confused by PyFree's pool address validation that intentionally reads the memory just before the allocated block, and incorrectly attributes it to a previously allocated (and hence freed) block, but I can't prove that. Has anyone investigated this kind of valgrind report?
Did you use the suppressions file as suggested in Misc/README.valgrind? --suppressions=Misc/valgrind-python.supp -- Amaury Forgeot d'Arc
Le Friday 28 November 2008 13:56:34 Amaury Forgeot d'Arc, vous avez écrit :
Hrvoje Niksic wrote:
A friend pointed out that running python under valgrind (simply "valgrind python") produces a lot of "invalid read" errors. (...) PyFree (...)
Did you use the suppressions file as suggested in Misc/README.valgrind?
--suppressions=Misc/valgrind-python.supp
To be able to use the suppressions, Python have to be compiled with Py_USING_MEMORY_DEBUGGER. Edit Object/obmalloc.c near line 680. -- Victor Stinner aka haypo http://www.haypocalc.com/blog/
Amaury Forgeot d'Arc wrote:
Did you use the suppressions file as suggested in Misc/README.valgrind?
Thanks for the suggestion (as well as to Gustavo and Victor), but my question wasn't about how to suppress the messages, but about why the messages appear in the first place. I think my last paragraph answers my own question, but I'm not sure.
Probably because of the object memory allocator. It reads the start of memory pages to see if a block belongs tot the obmalloc system or not. You want to remove the following line: #define WITH_PYMALLOC 1
From pyconfig.h if you intend to run using valgrind or say, purify. K
-----Original Message----- From: python-dev-bounces+kristjan=ccpgames.com@python.org [mailto:python-dev-bounces+kristjan=ccpgames.com@python.org] On Behalf Of Hrvoje Niksic Sent: 28. nóvember 2008 13:52 Cc: Python-Dev Subject: Re: [Python-Dev] Python under valgrind Amaury Forgeot d'Arc wrote:
Did you use the suppressions file as suggested in Misc/README.valgrind?
Thanks for the suggestion (as well as to Gustavo and Victor), but my question wasn't about how to suppress the messages, but about why the messages appear in the first place. I think my last paragraph answers my own question, but I'm not sure. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com
participants (4)
-
Amaury Forgeot d'Arc
-
Hrvoje Niksic
-
Kristján Valur Jónsson
-
Victor Stinner