Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Tim Peters
[Phillip J. Eby] > Even with the close() gimmicks still in place? If so, it sounds like the > safest thing for a2 might be to claim that generators always need > finalizing. :( LOL! Been there many times before: Python's gc really does work, but it's as unforgivingly delicate as any dance you'

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Phillip J. Eby
At 01:11 AM 4/15/2006 +0200, Thomas Wouters wrote: >On 4/15/06, Thomas Wouters <[EMAIL PROTECTED]> >wrote: >>(I first thought the problem was caused by gen_dealloc doing >>'Py_DECREF(gen->gen_frame)' instead of 'frame = gen->gen_frame; >>gen->gen_frame = NULL; Py_DECREF

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Thomas Wouters
On 4/15/06, Thomas Wouters <[EMAIL PROTECTED]> wrote: (I first thought the problem was caused by gen_dealloc doing 'Py_DECREF(gen->gen_frame)' instead of 'frame = gen->gen_frame; gen->gen_frame = NULL; Py_DECREF(frame)', but that isn't the case. It should do it that way, I believe, but it's not the

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Phillip J. Eby
At 06:26 PM 4/14/2006 -0400, Phillip J. Eby wrote: >If you replace the fun_tests in test_generators with this, and remove all >the other tests (e.g. pep_tests, tut_tests, etc.) you can still get it to >crash. The code above is much shorter, but has the disadvantage that I >don't really know what i

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Thomas Wouters
On 4/15/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: Interestingly, this code does *not* crash the interpreter on its own, onlywhen run as a doctest (with or without regrtest).Actually, it does, you just have to force GC to clean up stuff (rather than wait for the interpreter-exit to just toss the

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Phillip J. Eby
At 11:51 PM 4/14/2006 +0200, Thomas Wouters wrote: >On 4/14/06, Phillip J. Eby ><[EMAIL PROTECTED]> wrote: >>At 03:49 PM 4/14/2006 -0400, Tim Peters wrote: >> > That eventually >> >pointed to an off-by-one error in the new PyGen_NeedsFinalizing(), >> >where reading up

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Thomas Wouters
On 4/14/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: At 03:49 PM 4/14/2006 -0400, Tim Peters wrote:>   That eventually>pointed to an off-by-one error in the new PyGen_NeedsFinalizing(),>where reading up trash made it very likely that old generators>containing an active loop would falsely claim the

Re: [Python-Dev] Debugging opportunity :-)

2006-04-14 Thread Phillip J. Eby
At 03:49 PM 4/14/2006 -0400, Tim Peters wrote: > That eventually >pointed to an off-by-one error in the new PyGen_NeedsFinalizing(), >where reading up trash made it very likely that old generators >containing an active loop would falsely claim they need finalization. >Alas, fix that, and Python s