[ghc/f20] fix segfault on i686 when using ffi double-mapping for selinux (#907515)
Jens Petersen
petersen at fedoraproject.org
Wed Jan 29 04:03:39 UTC 2014
commit 61fc08e4d39e40b039e4ae9d9e924769bb2f9af1
Author: Jens Petersen <petersen at redhat.com>
Date: Wed Jan 29 13:03:47 2014 +0900
fix segfault on i686 when using ffi double-mapping for selinux (#907515)
see http://hackage.haskell.org/trac/ghc/ticket/7629
thanks Garrett Mitchener for patch committed upstream
ghc-7.6.3-rts-Adjustor-32bit-segfault.patch | 11 +++++++++++
ghc.spec | 11 ++++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/ghc-7.6.3-rts-Adjustor-32bit-segfault.patch b/ghc-7.6.3-rts-Adjustor-32bit-segfault.patch
new file mode 100644
index 0000000..ca608e7
--- /dev/null
+++ b/ghc-7.6.3-rts-Adjustor-32bit-segfault.patch
@@ -0,0 +1,11 @@
+Index: rts/Adjustor.c
+===================================================================
+--- rts/Adjustor.c (revision c2870706b29c24ac86ae2a9e2359dd1e4af71ac8)
++++ rts/Adjustor.c (revision 27cf625ab871f34434d9fe86cecf85a31f73f0e5)
+@@ -390,5 +390,5 @@
+
+ adjustorStub->call[0] = 0xe8;
+- *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)adjustorStub + 5);
++ *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)code + 5);
+ adjustorStub->hptr = hptr;
+ adjustorStub->wptr = wptr;
diff --git a/ghc.spec b/ghc.spec
index cc8eb80..d1a26b1 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -25,7 +25,7 @@ Version: 7.6.3
# - release can only be reset if *all* library versions get bumped simultaneously
# (sometimes after a major release)
# - minor release numbers for a branch should be incremented monotonically
-Release: 18.2%{?dist}
+Release: 18.3%{?dist}
Summary: Glasgow Haskell Compiler
License: %BSDHaskellReport
@@ -52,6 +52,8 @@ Patch13: ghc-llvmCodeGen-empty-array.patch
Patch14: ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch
# fix hang on ppc64 and s390x
Patch15: ghc-64bit-bigendian-rts-hang-989593.patch
+# fix libffi segfaults on 32bit
+Patch17: ghc-7.6.3-rts-Adjustor-32bit-segfault.patch
# fedora ghc has been bootstrapped on
# %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel s390 s390x
@@ -237,6 +239,8 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
%patch15 -p1 -b .orig
%endif
+%patch17 -p0 -b .orig
+
%build
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
@@ -450,6 +454,11 @@ fi
%changelog
+* Wed Jan 29 2014 Jens Petersen <petersen at redhat.com> - 7.6.3-18.3
+- fix segfault on i686 when using ffi double-mapping for selinux (#907515)
+ see http://hackage.haskell.org/trac/ghc/ticket/7629
+ (thanks Garrett Mitchener for patch committed upstream)
+
* Wed Oct 30 2013 Jens Petersen <petersen at redhat.com> - 7.6.3-18.2
- enable debuginfo for C code bits (#989593)
- back to production build
More information about the scm-commits
mailing list