This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-1012-g7333835


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  73338355920056d87648c65ccba9a875c289b37e (commit)
      from  e2d6cea0a17ecd7ed32b2137e38d44d956d09316 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73338355920056d87648c65ccba9a875c289b37e

commit 73338355920056d87648c65ccba9a875c289b37e
Author: Andreas Jaeger <jaegerandi@gmail.com>
Date:   Tue May 22 22:35:04 2012 +0200

    Fix x86_64/sched_getcpu.S error code
    
    Rearrange code so that pseudo_end is just ret and the stack pointer
    is correct also for static library in error case.

diff --git a/ChangeLog b/ChangeLog
index 159f4f2..8206ea4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-22  Andreas Jaeger  <aj@suse.de>
+
+	* sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S: Rearrange code so
+	that pseudo_end is just ret and the stack pointer is correct also
+	for static library in error case.
+
 2012-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
 	[BZ #14122]
diff --git a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
index 4c3cebe..896deb0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
+++ b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -59,13 +59,17 @@ ENTRY (sched_getcpu)
 # endif
 #endif
 
+	/* Local variable is result if the call is successful.  */
+	movl	(%rsp), %edx
+	/* Restore stack pointer before we might jump to
+	SYSCALL_ERROR_LABEL which returns to the caller.  */
+	add	$0x8, %rsp
+	cfi_adjust_cfa_offset(-8)
+
 	cmpq	$-4095, %rax
 	jae	SYSCALL_ERROR_LABEL
 
-	movl	(%rsp), %eax
-
+	movl	%edx, %eax
 L(pseudo_end):
-	add	$0x8, %rsp
-	cfi_adjust_cfa_offset(-8)
 	ret
 PSEUDO_END(sched_getcpu)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                     |    6 ++++++
 sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S |   14 +++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]