Can we do something about it? It is probably a stack overflow. It would be better if we could check for stack size and report an exception instead of trigging a segmentation fault.
#!/usr/bin/env python
from guppy import hpy
class node(object):
def __init__(self, value, _next=None):
self.value = value
self.next = _next
llist = node(0)
curnode = llist
for i in xrange(int(1e6)):
curnode.next = node(0)
curnode = curnode.next
heap = hpy().heap()
This bug was first reported at: https://sourceforge.net/p/guppy-pe/bugs/20/
Can we do something about it? It is probably a stack overflow. It would be better if we could check for stack size and report an exception instead of trigging a segmentation fault.