Test stack overflow handler