[Cython] Compiler crash in MarkOverflowingArithmetic
Jakub Wilk
jwilk at jwilk.net
Sun Aug 30 21:29:47 CEST 2015
Tested with Cython 0.23.1 on i386. You will probably need a bigger
number to trigger it on a 64-bit machine.
$ cython test.pyx
Error compiling Cython file:
------------------------------------------------------------
...
DEF X = 0x811C9DC5
cdef void f():
cdef unsigned int x = X
^
------------------------------------------------------------
test.pyx:3:9: Compiler crash in MarkOverflowingArithmetic
ModuleNode.body = StatListNode(test.pyx:2:5)
StatListNode.stats[0] = CFuncDefNode(test.pyx:2:5,
args = [...]/0,
modifiers = [...]/0,
visibility = 'private')
CFuncDefNode.body = StatListNode(test.pyx:3:9)
StatListNode.stats[0] = SingleAssignmentNode(test.pyx:3:9,
first = True)
Compiler crash traceback from this point on:
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Visitor.py", line 183, in _visit
return handler_method(obj)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/TypeInference.py", line 327, in visit_SingleAssignmentNode
self.visit_assignment(node.lhs, node.rhs)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/TypeInference.py", line 321, in visit_assignment
and Utils.long_literal(rhs.value)):
File "/usr/local/lib/python2.7/dist-packages/Cython/Utils.py", line 318, in long_literal
value = str_to_number(value)
File "/usr/local/lib/python2.7/dist-packages/Cython/Utils.py", line 312, in str_to_number
value = int(value, 0)
ValueError: invalid literal for int() with base 0: '2166136261L'
--
Jakub Wilk
-------------- next part --------------
DEF X = 0x811C9DC5
cdef void f():
cdef unsigned int x = X
More information about the cython-devel
mailing list