[Python-Dev] Preserving the blamelist
Tim Peters
tim.peters at gmail.com
Wed Apr 12 08:15:26 CEST 2006
[Neal Norwitz]
> ...
> I'm concerned about the negative ref leak in test_contextlib. I
> wonder if this was a result of PJE's fix for generators?
I don't know, but if you do
while 1:
test_contextlib.test_main()
gc.collect()
under a debug build it eventually (> 500 iterations) crashes with
Fatal Python error: deallocating None
That's a pretty good clue ;-) The
Py_XDECREF(gen->gi_frame);
in gen_dealloc() is on the call stack at the time, and cyclic gc is active.
More information about the Python-Dev
mailing list