arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone
Blob Blame History Raw
commit bbab82c25da9b504c0804119840de7aeab0eeeba
Author: Andreas Schwab <schwab@suse.de>
Date:   Tue Aug 4 12:35:50 2015 +0200

    Properly terminate FDE in makecontext for ix86 (bug 18635)

Downstream never set test-xfail-tst-makecontext, so it is not removed by
this patch.

diff --git a/sysdeps/unix/sysv/linux/i386/makecontext.S b/sysdeps/unix/sysv/linux/i386/makecontext.S
index 106b865066d346b6..48643864b05568b0 100644
--- a/sysdeps/unix/sysv/linux/i386/makecontext.S
+++ b/sysdeps/unix/sysv/linux/i386/makecontext.S
@@ -83,6 +83,10 @@ ENTRY(__makecontext)
 #else
 	movl	$L(exitcode), (%edx)
 #endif
+	/* We need to terminate the FDE here instead of after ret because
+	   the unwinder looks at ra-1 for unwind information.  */
+	cfi_endproc
+
 	/* 'makecontext' returns no value.  */
 	ret
 
@@ -92,7 +96,6 @@ ENTRY(__makecontext)
 	   the context 'makecontext' manipulated at the time of the
 	   'makecontext' call.  If the pointer is NULL the process must
 	   terminate.  */
-	cfi_endproc
 L(exitcode):
 	/* This removes the parameters passed to the function given to
 	   'makecontext' from the stack.  EBX contains the number of