translator/c/test/test_refcount.py::TestRefcount::()::test_del_catches
self = <rpython.translator.c.test.test_refcount.TestRefcount object at 0x0000000022a6b7f8>
def test_del_catches(self):
import os
def g():
pass
class A(object):
def __del__(self):
try:
g()
except:
pass #os.write(1, "hallo")
def f1(i):
if i:
raise TypeError
def f(i):
a = A()
f1(i)
a.b = 1
return a.b
> fn = self.compile_func(f, [int])
translator/c/test/test_refcount.py:127:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
translator/c/test/test_refcount.py:10: in compile_func
return compile(func, args, gcpolicy='ref')
translator/c/test/test_genc.py:124: in compile
t.compile_c()
translator/interactive.py:123: in compile_c
self.driver.compile_c()
translator/driver.py:108: in proc
return self.proceed(backend_goal)
translator/driver.py:569: in proceed
result = self._execute(goals, task_skip = self._maybe_skip())
translator/tool/taskengine.py:114: in _execute
res = self._do(goal, taskcallable, *args, **kwds)
translator/driver.py:278: in _do
res = func()
translator/driver.py:435: in task_database_c
database = cbuilder.build_database()
translator/c/genc.py:102: in build_database
self.config.translation.reverse_debugger)
translator/c/database.py:64: in __init__
self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks)
translator/c/gc.py:99: in gettransformer
return refcounting.RefcountingGCTransformer(translator)
memory/gctransform/refcounting.py:24: in __init__
super(RefcountingGCTransformer, self).__init__(translator, inline=True)
memory/gctransform/transform.py:518: in __init__
ll_raw_malloc_fixedsize, [lltype.Signed], llmemory.Address)
memory/gctransform/transform.py:292: in inittime_helper
ptr = self.annotate_helper(ll_helper, ll_args, ll_result, inline=inline)
memory/gctransform/transfor (somefailed=True in translator/c/test/test_refcount.py)
builder: rpython-linux-aarch64 build #572+
test: translator/c/test/test_refcount.py::TestRefcount::()::test_del_catches