[glibc] 01/02: patches/hurd-i386/unsubmitted-exp-hidden-jump.diff: New patch
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch glibc-2.26
in repository glibc.
commit d7574d3921eb1381e72b1f7f97dcfb869bcbea8f
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sun Sep 10 19:13:38 2017 +0000
patches/hurd-i386/unsubmitted-exp-hidden-jump.diff: New patch
---
debian/changelog | 1 +
.../hurd-i386/unsubmitted-exp-hidden-jump.diff | 76 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/testsuite-xfail-debian.mk | 10 ++-
4 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3aa45f7..5a78ab7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -76,6 +76,7 @@ glibc (2.26-0experimental0) UNRELEASED; urgency=medium
- patches/hurd-i386/cvs-truncate64.diff: Remove unused merged patch.
- patches/hurd-i386/git-tst-udp-timeout.diff: New patch.
- patches/hurd-i386/submitted-resolv.diff: New patch.
+ - patches/hurd-i386/unsubmitted-exp-hidden-jump.diff: New patch.
- testsuite-xfail-debian.mk: Update with new tests failing on hurd-i386.
-- Adam Conrad <adconrad@0c3.net> Sat, 02 Sep 2017 12:15:10 -0600
diff --git a/debian/patches/hurd-i386/unsubmitted-exp-hidden-jump.diff b/debian/patches/hurd-i386/unsubmitted-exp-hidden-jump.diff
new file mode 100644
index 0000000..a2964b4
--- /dev/null
+++ b/debian/patches/hurd-i386/unsubmitted-exp-hidden-jump.diff
@@ -0,0 +1,76 @@
+hidden jump can not work in these snippets in the NO_HIDDEN case, because %ebx
+is not set as PIC register, and thus one can't use the @plt version.
+
+Until we avoid using NO_HIDDEN (see
+https://sourceware.org/bugzilla/show_bug.cgi?id=15605#c5), we need this.
+
+diff --git a/sysdeps/i386/fpu/e_expl.S b/sysdeps/i386/fpu/e_expl.S
+index 7d75fe22a1..8c06f5c3ee 100644
+--- a/sysdeps/i386/fpu/e_expl.S
++++ b/sysdeps/i386/fpu/e_expl.S
+@@ -81,7 +81,13 @@ ENTRY(IEEE754_EXPL)
+ movzwl 4+8(%esp), %eax
+ xorb $0x80, %ah // invert sign bit (now 1 is "positive")
+ cmpl $0xc006, %eax // is num positive and exp >= 6 (number is >= 128.0)?
++ #if !defined(PIC) || !defined(NO_HIDDEN)
+ jae HIDDEN_JUMPTARGET (__expl) // (if num is denormal, it is at least >= 64.0)
++ #else
++ jb 0f
++ jmp __expl // (if num is denormal, it is at least >= 64.0)
++0:
++ #endif
+ #endif
+ fldt 4(%esp)
+ /* I added the following ugly construct because expl(+-Inf) resulted
+diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S
+index 9e162848e4..04f07dcc5e 100644
+--- a/sysdeps/i386/fpu/e_powl.S
++++ b/sysdeps/i386/fpu/e_powl.S
+@@ -242,7 +242,11 @@ ENTRY(__ieee754_powl)
+ cfi_adjust_cfa_offset (28)
+ fstpt 12(%esp) // x
+ fstpt (%esp) // <empty>
++ #if !defined(PIC) || !defined(NO_HIDDEN)
+ call HIDDEN_JUMPTARGET (__powl_helper) // <result>
++ #else
++ call __powl_helper // <result>
++ #endif
+ addl $36, %esp
+ cfi_adjust_cfa_offset (-36)
+ ret
+diff --git a/sysdeps/i386/fpu/s_expm1.S b/sysdeps/i386/fpu/s_expm1.S
+index 59fded2d5a..60096d23ae 100644
+--- a/sysdeps/i386/fpu/s_expm1.S
++++ b/sysdeps/i386/fpu/s_expm1.S
+@@ -51,7 +51,13 @@ ENTRY(__expm1)
+ movzwl 4+6(%esp), %eax
+ xorb $0x80, %ah // invert sign bit (now 1 is "positive")
+ cmpl $0xc086, %eax // is num >= 704?
++ #if !defined(PIC) || !defined(NO_HIDDEN)
+ jae HIDDEN_JUMPTARGET (__exp)
++ #else
++ jb 0f
++ jmp __exp
++0:
++ #endif
+
+ fldl 4(%esp) // x
+ fxam // Is NaN, +-Inf or +-0?
+diff --git a/sysdeps/i386/fpu/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S
+index 4f0b2e7832..51d5aa8c4f 100644
+--- a/sysdeps/i386/fpu/s_expm1f.S
++++ b/sysdeps/i386/fpu/s_expm1f.S
+@@ -51,7 +51,13 @@ ENTRY(__expm1f)
+ movzwl 4+2(%esp), %eax
+ xorb $0x80, %ah // invert sign bit (now 1 is "positive")
+ cmpl $0xc2b1, %eax // is num >= 88.5?
++ #if !defined(PIC) || !defined(NO_HIDDEN)
+ jae HIDDEN_JUMPTARGET (__expf)
++ #else
++ jb 0f
++ jmp __expf
++0:
++ #endif
+
+ flds 4(%esp) // x
+ fxam // Is NaN, +-Inf or +-0?
diff --git a/debian/patches/series b/debian/patches/series
index 67bb03b..0520a20 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -155,6 +155,7 @@ hurd-i386/git-clone.diff
hurd-i386/git-gethostname.diff
hurd-i386/git-tst-udp-timeout.diff
hurd-i386/submitted-resolv.diff
+hurd-i386/unsubmitted-exp-hidden-jump.diff
i386/local-biarch.diff
i386/unsubmitted-quiet-ldconfig.diff
diff --git a/debian/testsuite-xfail-debian.mk b/debian/testsuite-xfail-debian.mk
index 4047754..1d93915 100644
--- a/debian/testsuite-xfail-debian.mk
+++ b/debian/testsuite-xfail-debian.mk
@@ -171,9 +171,9 @@ test-xfail-check-abi-librt = yes
# Overzealous test
test-xfail-tst-pathconf = yes
-# Need investigation
-test-xfail-check-execstack = yes
-test-xfail-check-localplt = yes
+# This jumps to bogus place from sysdeps/i386/fpu/e_expl.S'
+# jae HIDDEN_JUMPTARGET (__expl)
+# This jumps to __expl@plt, but %ebx is not set as PIC register!
test-xfail-test-ifloat-expm1 = yes
test-xfail-test-ifloat-sinh = yes
test-xfail-test-idouble-expm1 = yes
@@ -183,6 +183,10 @@ test-xfail-test-ildouble-expm1 = yes
test-xfail-test-ildouble-sinh = yes
test-xfail-test-ldouble-expm1 = yes
test-xfail-test-ldouble-finite-expm1 = yes
+
+# Need investigation
+test-xfail-check-execstack = yes
+test-xfail-check-localplt = yes
test-xfail-tst-aio10 = yes
test-xfail-tst-aio9 = yes
test-xfail-tst-audit1 = yes
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: