Ticket #13901: test.sage

File test.sage, 345 bytes (added by nbruin, 9 years ago)

script to cause a C stack overflow.

Line 
1cython("""
2cdef class A(object):
3    cdef object ref
4    def __init__(self,ref):
5        self.ref = ref
6
7""")
8
9b=A(None)
10print "allocating b"
11for i in range(10**6):
12    b=A((b,))
13
14print "deleting b"
15del b
16print "done deleting b"
17
18print "allocating a"
19a=A(None)
20for i in range(10**6):
21    a=A(a)
22
23print "deleting a"
24del a
25print "done deleting a"