Bug in Python

Terry Reedy tjreedy at udel.edu
Wed Apr 18 01:49:03 EDT 2012


On 4/18/2012 12:47 AM, Hans Mulder wrote:
> On 18/04/12 03:08:08, Kiuhnm wrote:
>> print(1)
>> print(2)
>> print(3)
>>
>> with open('test') as f:
>>      data = f.read()
>> with open('test') as f:
>>      data = f.read()

How much of that is needed to trigger the problem?
All three prints? Any of them?

> I get the same result with Pythin 3.3.0a0 on MacOS X 10.6:
>
> 93>  ./python.exe -m pdb /tmp/script.py
>> /tmp/script.py(1)<module>()
> ->  print(1)
> (Pdb) j 7
> Assertion failed: (blockstack_top>  0), function frame_setlineno, file
> Objects/frameobject.c, line 208.
> Abort trap
>
> The assertion that fails is in this code fragment:
>
>          case POP_BLOCK:
>              assert(blockstack_top>  0);
>
> This looks like a genuine bug in the CPythin interpreter to me.

Looks like something to report on the tracker bugs.python.org
If either of you do that, please include details above.

-- 
Terry Jan Reedy




More information about the Python-list mailing list