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: SystemError accessing uninitialised cell contents
Type: behavior Stage:
Components: Interpreter Core Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, duncanb, gvanrossum
Priority: normal Keywords:

Created on 2007-11-15 10:27 by duncanb, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg57525 - (view) Author: Duncan Booth (duncanb) Date: 2007-11-15 10:27
The following code throws a SystemError exception. cell_get_contents in
Objects\cellobject.c should check for a null op->ob_ref value and throw
an appropriate exception.

>>> def oops():
	def f(): cell
	f.func_closure[0].cell_contents
	cell = None

	
>>> oops()

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    oops()
  File "<pyshell#8>", line 3, in oops
    f.func_closure[0].cell_contents
SystemError: error return without exception set
>>>
msg57559 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-15 20:41
Patch anyone?
msg57805 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2007-11-24 13:54
Fixed in r59170 (trunk) and r59171 (release25-maint).
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45786
2007-11-24 13:54:26amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
messages: + msg57805
nosy: + amaury.forgeotdarc
2007-11-15 20:41:20gvanrossumsetnosy: + gvanrossum
messages: + msg57559
2007-11-15 10:27:48duncanbcreate