This is quite unusual, for some reason PHP segfaults after I call my
function. The function deals with Resources from another module, it works,
that's not the problem. The functions works exactly as anticipated, however
if I call that function again or if I call die or exit PHP segfaults.
Any ideas on what might be wrong?