about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-12 14:41:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-08-05 08:36:27 -0700
commit72354ab5e1d61dec7606a8851f0eb1bb016f7af7 (patch)
treeb38c5c886dcc21eeb4c8cd31c27f5a1b0bf67f99
parentb4425b95ad64e5945ea9674f888561d725747128 (diff)
downloadglibc-72354ab5e1d61dec7606a8851f0eb1bb016f7af7.tar.gz
glibc-72354ab5e1d61dec7606a8851f0eb1bb016f7af7.tar.xz
glibc-72354ab5e1d61dec7606a8851f0eb1bb016f7af7.zip
Align stack to 16 bytes when calling __errno_location
We should align stack to 16 bytes when calling __errno_location.

	[BZ #18661]
	* sysdeps/x86_64/fpu/s_cosf.S (__cosf): Align stack to 16 bytes
	when calling __errno_location.
	* sysdeps/x86_64/fpu/s_sincosf.S (__sincosf): Likewise.
	* sysdeps/x86_64/fpu/s_sinf.S (__sinf): Likewise.
-rw-r--r--ChangeLog8
-rw-r--r--NEWS2
-rw-r--r--sysdeps/x86_64/fpu/s_cosf.S6
-rw-r--r--sysdeps/x86_64/fpu/s_sincosf.S6
-rw-r--r--sysdeps/x86_64/fpu/s_sinf.S6
5 files changed, 27 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 763771e848..4f985f1591 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
 2015-08-05  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #18661]
+	* sysdeps/x86_64/fpu/s_cosf.S (__cosf): Align stack to 16 bytes
+	when calling __errno_location.
+	* sysdeps/x86_64/fpu/s_sincosf.S (__sincosf): Likewise.
+	* sysdeps/x86_64/fpu/s_sinf.S (__sinf): Likewise.
+
+2015-08-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #18661]
 	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
 	(__lll_timedwait_tid): Align stack to 16 bytes when calling
 	__gettimeofday.
diff --git a/NEWS b/NEWS
index 0eef93906a..a47687ea25 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,7 @@ using `glibc' in the "product" field.
 Version 2.23
 
 * The following bugs are resolved with this release:
-  18265, 18525, 18647.
+  18265, 18525, 18647, 18661.
 
 Version 2.22
 
diff --git a/sysdeps/x86_64/fpu/s_cosf.S b/sysdeps/x86_64/fpu/s_cosf.S
index b7868ceb20..bea10ef089 100644
--- a/sysdeps/x86_64/fpu/s_cosf.S
+++ b/sysdeps/x86_64/fpu/s_cosf.S
@@ -310,8 +310,14 @@ L(arg_inf_or_nan):
 	/* Here if |x| is Inf or NAN */
 	jne	L(skip_errno_setting)	/* in case of x is NaN */
 
+	/* Align stack to 16 bytes.  */
+	subq	$8, %rsp
+	cfi_adjust_cfa_offset (8)
 	/* Here if x is Inf. Set errno to EDOM.  */
 	call	JUMPTARGET(__errno_location)
+	addq	$8, %rsp
+	cfi_adjust_cfa_offset (-8)
+
 	movl	$EDOM, (%rax)
 
 	.p2align	4
diff --git a/sysdeps/x86_64/fpu/s_sincosf.S b/sysdeps/x86_64/fpu/s_sincosf.S
index 21db70a88b..a2f313338f 100644
--- a/sysdeps/x86_64/fpu/s_sincosf.S
+++ b/sysdeps/x86_64/fpu/s_sincosf.S
@@ -354,8 +354,14 @@ L(arg_inf_or_nan):
 	/* Here if |x| is Inf or NAN */
 	jne	L(skip_errno_setting)	/* in case of x is NaN */
 
+	/* Align stack to 16 bytes.  */
+	subq	$8, %rsp
+	cfi_adjust_cfa_offset (8)
 	/* Here if x is Inf. Set errno to EDOM.  */
 	call	JUMPTARGET(__errno_location)
+	addq	$8, %rsp
+	cfi_adjust_cfa_offset (-8)
+
 	movl	$EDOM, (%rax)
 
 	.p2align	4
diff --git a/sysdeps/x86_64/fpu/s_sinf.S b/sysdeps/x86_64/fpu/s_sinf.S
index dc921641de..90afbe8e5f 100644
--- a/sysdeps/x86_64/fpu/s_sinf.S
+++ b/sysdeps/x86_64/fpu/s_sinf.S
@@ -336,8 +336,14 @@ L(arg_inf_or_nan):
 	/* Here if |x| is Inf or NAN */
 	jne	L(skip_errno_setting)	/* in case of x is NaN */
 
+	/* Align stack to 16 bytes.  */
+	subq	$8, %rsp
+	cfi_adjust_cfa_offset (8)
 	/* Here if x is Inf. Set errno to EDOM.  */
 	call	JUMPTARGET(__errno_location)
+	addq	$8, %rsp
+	cfi_adjust_cfa_offset (-8)
+
 	movl	$EDOM, (%rax)
 
 	.p2align	4