Michael Klein added the comment:

I found a simpler one, like Amaury's eval("+1" * 748580):

def f(x): 
    y = x+x+x+x+x
    return y
print f(0)

(Except there are 74875 x+'s. This is exactly enough for a segfault, one less 
runs fine.)

I've tried something like:

 loopcount = 0
  loopcount += (1-a36)*(a37)*(1-a41)
  ...
  return loopcount

It works, but it's still pretty slow. (At least it doesn't crash.) I tried 
converting to C with Cython, but it's too big to be processed in a reasonable 
amount of time, but this is irrelevant to the bug.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23643>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to