Local variables, recursion and reentrancy