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: Exceptions don't call _PyObject_GC_UNTRACK(self)
Type: Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: georg.brandl, nnorwitz, zseil
Priority: high Keywords:

Created on 2006-08-17 15:21 by zseil, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
exceptions-untrack.diff georg.brandl, 2006-09-05 05:22
Messages (4)
msg29537 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-08-17 15:21
If I understand the GC rules correctly, BaseException
and its subclasses should call _PyObject_GC_UNTRACK
in their tp_dealloc methods.

msg29538 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-09-05 05:22
Logged In: YES 
user_id=849994

Attaching my patch here.

Neal: PyObject_GC_TRACK is called in PyType_GenericAlloc,
which is used for exceptions since the tp_alloc slot is 0.
msg29539 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-09-05 06:09
Logged In: YES 
user_id=33168

Yeah, this makes sense.

Georg, can you come up with a test for this?  (It's ok if
it's only triggered with -R flag.)  This also needs a NEWS
entry.
msg29540 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-09-06 06:50
Logged In: YES 
user_id=849994

I have now committed the patch.

I couldn't whip up a test, however, that would have been
triggered in some way.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43846
2006-08-17 15:21:07zseilcreate