From 0622245f06e23017b4114b5a68b1dc19ae4edd07 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 15 Feb 2018 04:34:37 +0000 Subject: [PATCH] x86_64: trampoline: do same cleanups as in x86 --- arch/x86_64/startcontext.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/startcontext.S b/arch/x86_64/startcontext.S index 93e35ce..54468f5 100644 --- a/arch/x86_64/startcontext.S +++ b/arch/x86_64/startcontext.S @@ -16,13 +16,15 @@ __start_context: movq %rbx, %rsp movq (%rsp), %rdi testq %rdi, %rdi - je hosed + + /* if we have no linked context, lets get out of here */ + je no_linked_context /* call setcontext to switch to the linked context */ call __setcontext@plt movq %rax, %rdi -hosed: +no_linked_context: /* we are returning into a null context, it seems, so maybe we should exit */ call exit@plt