[Cython] BUG: Cython's dies with AttributeError

Lars Buitinck L.J.Buitinck at uva.nl
Thu Jul 7 23:25:23 CEST 2011


Dear developers,

I just got an error message from Cython (current Git). The error can
be reproduced by putting

cdef foo(): pass

in a file called foo.pyx, and compiling that. (I know there's an error
in the file as well.) Would you kindly look into this bug? The error
message was:


foo.pyx:1:9: Compiler crash in PostParse

ModuleNode.body = StatListNode(foo.pyx:1:5)
StatListNode.stats[0] = CFuncDefNode(foo.pyx:1:5,
    modifiers = [...]/0,
    visibility = u'private')
CFuncDefNode.declarator = CFuncDeclaratorNode(foo.pyx:1:9,
    calling_convention = '')
CFuncDeclaratorNode.base = CNameDeclaratorNode(foo.pyx:1:9,
    calling_convention = u'',
    name = u'foo')

Compiler crash traceback from this point on:
  File "Visitor.py", line 173, in
Cython.Compiler.Visitor.TreeVisitor._visitchild
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:3550)
  File "Visitor.py", line 282, in
Cython.Compiler.Visitor.CythonTransform.visit_Node
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:5242)
  File "Visitor.py", line 234, in
Cython.Compiler.Visitor.VisitorTransform.visitchildren
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:4395)
  File "Visitor.py", line 202, in
Cython.Compiler.Visitor.TreeVisitor._visitchildren
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:4076)
AttributeError: 'CNameDeclaratorNode' object has no attribute 'base'
foo.pyx:1:9: Compiler crash in PostParse

ModuleNode.body = StatListNode(foo.pyx:1:5)
StatListNode.stats[0] = CFuncDefNode(foo.pyx:1:5,
    modifiers = [...]/0,
    visibility = u'private')
CFuncDefNode.declarator = CFuncDeclaratorNode(foo.pyx:1:9,
    calling_convention = '')
CFuncDeclaratorNode.base = CNameDeclaratorNode(foo.pyx:1:9,
    calling_convention = u'',
    name = u'foo')

Compiler crash traceback from this point on:
  File "Visitor.py", line 173, in
Cython.Compiler.Visitor.TreeVisitor._visitchild
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:3550)
  File "Visitor.py", line 282, in
Cython.Compiler.Visitor.CythonTransform.visit_Node
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:5242)
  File "Visitor.py", line 234, in
Cython.Compiler.Visitor.VisitorTransform.visitchildren
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:4395)
  File "Visitor.py", line 202, in
Cython.Compiler.Visitor.TreeVisitor._visitchildren
(/home/s1254871/src/cython/Cython/Compiler/Visitor.c:4076)
AttributeError: 'CNameDeclaratorNode' object has no attribute 'base'


-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam


More information about the cython-devel mailing list