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: refleaks in _hotshot.c
Type: Stage:
Components: Extension Modules Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: arigo Nosy List: arigo, fdrake, mwh, tim.peters
Priority: normal Keywords:

Created on 2003-09-18 18:01 by mwh, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
hotshot.diff mwh, 2003-09-18 18:01 mwh's first fix
hotshot2.diff tim.peters, 2003-09-22 13:28 Armin's patch
Messages (6)
msg18219 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2003-09-18 18:01
My regrtest patches revealed a few leaks in
Modules/_hotshot.c.

Attached patch seems to fix.
msg18220 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2003-09-22 12:01
Logged In: YES 
user_id=4771

Unless I'm mistaken there is a misplaced DECREF.

I'd love to attach my patch but cannot do so. Here it is:
http://arigo.tunes.org/hotshot2.diff

A more general note is about using 'N' in Py_BuildValue. Its
implementation seems to be buggy because it does not always
consume a reference: it won't do so if an error occurs
before it gets there. I guess I'll submit a separate bug
report/patch for this too.
msg18221 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2003-09-22 13:28
Logged In: YES 
user_id=31435

Just attaching Armin's patch (hotshot2.diff).
msg18222 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-08-02 14:22
Logged In: YES 
user_id=6656

This patch is still necessary, still applies and still fixes the leaks.  
Any objections to just checking it in?
msg18223 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2004-08-02 15:32
Logged In: YES 
user_id=3066

I just looked over Armin's version of the patch, and it
looks good to me.  Armin, please go ahead and commit, and
close this report.

This should be backported to 2.3.x as well; I think the
patch should apply cleanly to the branch as well as the trunk.
msg18224 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2004-08-03 09:03
Logged In: YES 
user_id=4771

Checked in:

           trunk  _hotshot.c  1.37
 release23-maint  _hotshot.c  1.34.10.1
History
Date User Action Args
2022-04-10 16:11:13adminsetgithub: 39256
2003-09-18 18:01:37mwhcreate