Commit b00e7a93 authored by Marius Wachtler's avatar Marius Wachtler

llvm tier: call deinitFrame when in CAPI mode and returning an exception

parent 7b941863
...@@ -3058,6 +3058,7 @@ public: ...@@ -3058,6 +3058,7 @@ public:
// just not created an Invoke and let the exception machinery propagate it for us. // just not created an Invoke and let the exception machinery propagate it for us.
assert(irstate->getExceptionStyle() == CAPI); assert(irstate->getExceptionStyle() == CAPI);
builder->CreateCall3(g.funcs.PyErr_Restore, exc_type, exc_value, exc_traceback); builder->CreateCall3(g.funcs.PyErr_Restore, exc_type, exc_value, exc_traceback);
builder->CreateCall(g.funcs.deinitFrame, irstate->getFrameInfoVar());
builder->CreateRet(getNullPtr(g.llvm_value_type_ptr)); builder->CreateRet(getNullPtr(g.llvm_value_type_ptr));
} }
......
# this test caused crashes because of a missing deinitFrame call in the LLVM tier when compiling funcs in CAPI mode
def next(x):
1/x
def foo(x):
try:
next(x)
except Exception as e:
print "exc", e
foo(1)
foo(0)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment