use 0 isntead of nullptr for stack_context