[New-bugs-announce] [issue4003] Reference leak in test_cprofile

Amaury Forgeot d'Arc report at bugs.python.org
Tue Sep 30 18:01:00 CEST 2008


New submission from Amaury Forgeot d'Arc <amauryfa at gmail.com>:

r66677 introduces a reference leak in test_cprofile, as shown by
http://mail.python.org/pipermail/python-checkins/2008-September/074355.html

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

	if (PyErr_Occurred()) {
		PyErr_WriteUnraisable(pObj->externalTimer);
		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.

----------
assignee: brett.cannon
keywords: needs review, patch
messages: 74082
nosy: amaury.forgeotdarc, benjamin.peterson, brett.cannon
priority: high
severity: normal
status: open
title: Reference leak in test_cprofile
versions: Python 2.5, Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4003>
_______________________________________


More information about the New-bugs-announce mailing list