https://github.com/python/cpython
Revision ded18d634f2e1615b746dca2698d6a98ff63045d authored by Guido van Rossum on 28 March 2002, 20:21:21 UTC, committed by Guido van Rossum on 28 March 2002, 20:21:21 UTC
this is what Zope 2 will be using in the foreseeable future).

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!
1 parent 00be96e
History
Tip revision: ded18d634f2e1615b746dca2698d6a98ff63045d authored by Guido van Rossum on 28 March 2002, 20:21:21 UTC
Backport for 2.1.3 (if we ever release it; we may have to because
Tip revision: ded18d6
File Mode Size
.cvsignore -rw-r--r-- 22 bytes
acceler.c -rw-r--r-- 3.2 KB
assert.h -rw-r--r-- 405 bytes
bitset.c -rw-r--r-- 949 bytes
firstsets.c -rw-r--r-- 2.1 KB
grammar.c -rw-r--r-- 4.6 KB
grammar1.c -rw-r--r-- 1001 bytes
intrcheck.c -rw-r--r-- 2.9 KB
listnode.c -rw-r--r-- 983 bytes
metagrammar.c -rw-r--r-- 2.1 KB
myreadline.c -rw-r--r-- 2.9 KB
node.c -rw-r--r-- 1.3 KB
parser.c -rw-r--r-- 7.8 KB
parser.h -rw-r--r-- 916 bytes
parsetok.c -rw-r--r-- 3.2 KB
pgen.c -rw-r--r-- 14.2 KB
pgen.h -rw-r--r-- 253 bytes
pgenmain.c -rw-r--r-- 3.5 KB
printgrammar.c -rw-r--r-- 2.4 KB
tokenizer.c -rw-r--r-- 17.4 KB
tokenizer.h -rw-r--r-- 1.8 KB

back to top