00db10
commit bbab82c25da9b504c0804119840de7aeab0eeeba
00db10
Author: Andreas Schwab <schwab@suse.de>
00db10
Date:   Tue Aug 4 12:35:50 2015 +0200
00db10
00db10
    Properly terminate FDE in makecontext for ix86 (bug 18635)
00db10
00db10
Downstream never set test-xfail-tst-makecontext, so it is not removed by
00db10
this patch.
00db10
00db10
diff --git a/sysdeps/unix/sysv/linux/i386/makecontext.S b/sysdeps/unix/sysv/linux/i386/makecontext.S
00db10
index 106b865066d346b6..48643864b05568b0 100644
00db10
--- a/sysdeps/unix/sysv/linux/i386/makecontext.S
00db10
+++ b/sysdeps/unix/sysv/linux/i386/makecontext.S
00db10
@@ -83,6 +83,10 @@ ENTRY(__makecontext)
00db10
 #else
00db10
 	movl	$L(exitcode), (%edx)
00db10
 #endif
00db10
+	/* We need to terminate the FDE here instead of after ret because
00db10
+	   the unwinder looks at ra-1 for unwind information.  */
00db10
+	cfi_endproc
00db10
+
00db10
 	/* 'makecontext' returns no value.  */
00db10
 	ret
00db10
 
00db10
@@ -92,7 +96,6 @@ ENTRY(__makecontext)
00db10
 	   the context 'makecontext' manipulated at the time of the
00db10
 	   'makecontext' call.  If the pointer is NULL the process must
00db10
 	   terminate.  */
00db10
-	cfi_endproc
00db10
 L(exitcode):
00db10
 	/* This removes the parameters passed to the function given to
00db10
 	   'makecontext' from the stack.  EBX contains the number of