classification
Title: README.valgrind should mention --with-valgrind
Type: enhancement Stage: patch review
Components: Build Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: lukasz.langa Nosy List: Elena.Oat, lukasz.langa, mmokrejs, sowmya-ravidas, tim.peters
Priority: normal Keywords: easy, patch

Created on 2013-08-28 00:19 by tim.peters, last changed 2017-02-03 20:21 by lukasz.langa.

Files
File name Uploaded Description Edit
patch.diff sowmya-ravidas, 2014-08-02 13:04 Patch review
issue18859.diff Elena.Oat, 2016-03-12 13:20 review
Messages (5)
msg196338 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2013-08-28 00:19
In issue 18843 a user noted that Misc/README.valgrind doesn't mention the --with-valgrind configure option.  It probably should.  But since I've never used valgrind, I'm not the guy to do it ;-)
msg196548 - (view) Author: Martin Mokrejs (mmokrejs) Date: 2013-08-30 14:23
Moreover, it should explain what that really does. One could think of several answers or even their combinations what this configure flag will really do:

a) python will run itself under valgrind, don't bother ever doing it yourself
b) you don't have to bother with uncommenting the lines in valgrind.supp
c) "make install" will install the valgrind.supp but you have to edit it on your own
d) you may use valgrind but don't use other tool replacing malloc(), like electric fence, DUMA, etc. You should be quite verbose how (in)compatible is this with other tools.

Or some combination of them?

valgrind docs say it won't work if a binary lacks debug symbols (wasn't compiled with -g). Initially I got mislead I though I have to convert my blah.py to blah.c using cython, compile that with "gcc -ggdb blah.c" and then I may run valgrind on the binary.

In the end, I don't understand why everybody has to remove the comment symbols from the valgrind-python.supp file at all. Why isn't that by default enabled?



I also suggest you mention right in the file other handy information because people quite likely get on this path while chasing memory corruption issues, maybe broken hardware:

1. Mention that python uses 256kB chunks by default.
2. Mention there exists --without-pymalloc as Tim explained me in http://bugs.python.org/issue18843#msg196492
3. Explain how to interpret those stacktraces one could get: http://bugs.python.org/issue18843#msg196481

Thank you!
msg224559 - (view) Author: Sowmya (sowmya-ravidas) Date: 2014-08-02 13:04
Hi,

I have created a patch for this bug. 
The Misc/README.valgrind now mentions the --with-valgrind configure options.
msg224573 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-08-02 14:47
Hi Sowmya. Currently we have the option to use --with-valgrind or
the old method --without-pymalloc. Both methods work.
msg261647 - (view) Author: Elena Oat (Elena.Oat) * Date: 2016-03-12 13:16
I've combined the patch submitted by Sowmya and also added there clarifications from points 1, 2 mentioned by Martin Mokrejs.
History
Date User Action Args
2017-02-03 20:21:40lukasz.langasetassignee: lukasz.langa

nosy: + lukasz.langa
2016-03-12 13:20:01Elena.Oatsetfiles: + issue18859.diff
2016-03-12 13:16:49Elena.Oatsetnosy: + Elena.Oat
messages: + msg261647
2014-10-14 16:57:35berker.peksagsetstage: needs patch -> patch review
type: enhancement
versions: + Python 3.5, - Python 3.3
2014-10-14 15:44:19skrahsetnosy: - skrah
2014-08-02 14:47:35skrahsetnosy: + skrah
messages: + msg224573
2014-08-02 13:04:56sowmya-ravidassetfiles: + patch.diff

nosy: + sowmya-ravidas
messages: + msg224559

keywords: + patch
type: enhancement -> (no value)
2014-05-13 22:02:10skrahsetnosy: - skrah
2013-09-04 19:10:48ezio.melottisettype: enhancement
2013-08-30 14:23:22mmokrejssetnosy: + mmokrejs
messages: + msg196548
2013-08-28 06:14:42pitrousetnosy: + skrah
2013-08-28 04:32:12tim.peterssetkeywords: + easy
2013-08-28 00:19:48tim.peterscreate