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.

Title: Reference leak in test_cprofile
Type: Stage:
Components: Versions: Python 2.6, Python 2.5
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: amaury.forgeotdarc, benjamin.peterson, brett.cannon
Priority: high Keywords: needs review, patch

Created on 2008-09-30 16:01 by amaury.forgeotdarc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg74082 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-30 16:00
r66677 introduces a reference leak in test_cprofile, as shown by

IMO, the code at the end of the function should not have been modified
this way. It is enough to do:

	if (PyErr_Occurred()) {
		return 0;

it's the same "PyErr_WriteUnraisable" statement as 18 lines above, which
is valid because pObj->externalTimer is still a living python object
even if pObj is being cleared.
msg74086 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-09-30 17:49
Amaury's fix works for me; since this is an edge case situation anyway,
I am not terribly worried about some fancy error message.

Fixed in r66700 for 2.6, r66701 for 2.5.
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48253
2008-09-30 17:49:22brett.cannonsetstatus: open -> closed
resolution: accepted
messages: + msg74086
2008-09-30 16:01:00amaury.forgeotdarccreate