svenil / guppy-pe

Main repository for Guppy-PE, for Python2, which contains the Heapy heap analysis toolset
http://guppy-pe.sourceforge.net/
MIT License
6 stars 0 forks source link

Segmentation fault on long list (Stack overflow?) #2

Open svenil opened 5 years ago

svenil commented 5 years ago

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.

#!/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()