]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Backport to 2.2.1.
authorGuido van Rossum <guido@python.org>
Thu, 28 Mar 2002 20:18:48 +0000 (20:18 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 28 Mar 2002 20:18:48 +0000 (20:18 +0000)
commitfe34d0facd54a6f471d73f3cba114dedc4f04969
tree47d00d20462fc98dba4c30760e9c0da49172315e
parent8812776e9010ed2947fafdd0fd085236a9f588fc
Backport to 2.2.1.

Fix an issue that was reported in but unrelated to the main problem of
SF bug 535905 (Evil Trashcan and GC interaction).

The SETLOCAL() macro should not DECREF the local variable in-place and
then store the new value; it should copy the old value to a temporary
value, then store the new value, and then DECREF the temporary value.
This is because it is possible that during the DECREF the frame is
accessed by other code (e.g. a __del__ method or gc.collect()) and the
variable would be pointing to already-freed memory.

BUGFIX CANDIDATE!
Python/ceval.c