This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: README.valgrind should mention --with-valgrind
Type: enhancement Stage: resolved
Components: Build Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: lukasz.langa Nosy List: CuriousLearner, Elena.Oat, Sourav Singh, lukasz.langa, mmokrejs, sowmya-ravidas, tim.peters
Priority: normal Keywords: easy, patch

Created on 2013-08-28 00:19 by tim.peters, last changed 2022-04-11 14:57 by admin. This issue is now closed.

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
Pull Requests
URL Status Linked Edit
PR 10591 merged CuriousLearner, 2018-11-18 17:58
Messages (9)
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.
msg294386 - (view) Author: Sourav Singh (Sourav Singh) Date: 2017-05-24 20:02
Is the issue fixed?
msg330109 - (view) Author: Sanyam Khurana (CuriousLearner) * (Python triager) Date: 2018-11-19 19:08
Patch added in PR: https://github.com/python/cpython/pull/10591
msg330125 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2018-11-20 11:11
New changeset d5d33681c1cd1df7731eb0fb7c0f297bc2f114e6 by Łukasz Langa (Sanyam Khurana) in branch 'master':
bpo-18859: Document --with-valgrind option in README.valgrind (#10591)
https://github.com/python/cpython/commit/d5d33681c1cd1df7731eb0fb7c0f297bc2f114e6
msg330126 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2018-11-20 11:12
Thanks! ✨ 🍰 ✨
History
Date User Action Args
2022-04-11 14:57:50adminsetgithub: 63059
2018-11-20 11:12:05lukasz.langasetstatus: open -> closed
versions: + Python 3.8, - Python 2.7, Python 3.4, Python 3.5
messages: + msg330126

resolution: fixed
stage: patch review -> resolved
2018-11-20 11:11:01lukasz.langasetmessages: + msg330125
2018-11-19 19:08:31CuriousLearnersetnosy: + CuriousLearner
messages: + msg330109
2018-11-18 17:58:05CuriousLearnersetpull_requests: + pull_request9837
2017-05-24 20:02:57Sourav Singhsetnosy: + Sourav Singh
messages: + msg294386
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