On 18 December 2010 18:19, Vineet Jain <[email protected]> wrote:

> The error can be produced by directly using cython as well. See below:
>
> Python version:
>
> Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>
> v...@host61:/host/trading/pytrade$ python-dbg
> Python 2.6.6 (r266:84292, Sep 15 2010, 17:09:03)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>
> cython --gdb container.pyx
>
> Error compiling Cython file:
> ------------------------------------------------------------
> ...
> def test(param):
>     def test2():
>    ^
> ------------------------------------------------------------
>
> container.pyx:2:4: Compiler crash in DebugTransform
>
> ModuleNode.body = StatListNode(container.pyx:1:0)
> StatListNode.stats[0] = DefNode(container.pyx:1:0,
>     modifiers = [...]/0,
>     name = u'test',
>     needs_closure = True,
>     num_required_args = 1,
>     reqd_kw_flags_cname = '0')
> DefNode.body = StatListNode(container.pyx:2:4)
> StatListNode.stats[0] = DefNode(container.pyx:2:4,
>     modifiers = [...]/0,
>     name = u'test2',
>     needs_outer_scope = True,
>     reqd_kw_flags_cname = '0')
>
> Compiler crash traceback from this point on:
>   File "Visitor.py", line 173, in
> Cython.Compiler.Visitor.TreeVisitor._visitchild
> (/root/Cython-0.14/Cython/Compiler/Visitor.c:3444)
>   File
> "/usr/local/lib/python2.6/dist-packages/Cython/Compiler/ParseTreeTransforms.py",
> line 1646, in visit_FuncDefNode
>     self.serialize_local_variables(node.local_scope.entries)
>   File
> "/usr/local/lib/python2.6/dist-packages/Cython/Compiler/ParseTreeTransforms.py",
> line 1703, in serialize_local_variables
>     qualified_name=entry.qualified_name,
> AttributeError: 'Entry' object has no attribute 'qualified_name'
> [126744 refs]
>
>
>
> On Sat, Dec 18, 2010 at 11:38 AM, Vineet Jain <[email protected]> wrote:
>
>> Fails to compile when I add
>>
>>         pyrex_gdb=True
>>
>> to my setup.py file.
>>
>>
>> def test(param):
>>     def test2():
>>         x = param.x
>>
>> rror compiling Cython file:
>> ------------------------------------------------------------
>> ...
>> def test(param):
>>     def test2():
>>    ^
>> ------------------------------------------------------------
>>
>> container.pyx:2:4: Compiler crash in DebugTransform
>>
>>
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
>
I fixed the issue and pushed to https://github.com/markflorisson88/cython ,
but I was actually not able to reproduce the crash. For me it generated some
extra XML that would simply be ignored by the debugger (which would mean you
wouldn't be able to set a Cython breakpoint for the inner function). This
was even the case with a fresh 0.14 non-development branch copy.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to