From 79d69f534eb7b2ce9efa99695167f61a75e85f5c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Jan 29 2014 02:26:21 +0000 Subject: fix segfault on i686 when using ffi double-mapping for selinux (#907515) - originally noticed with gtk2hs - see http://hackage.haskell.org/trac/ghc/ticket/7629 - thanks Garrett Mitchener for patch committed upstream --- 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 7e8aa41..20cf82e 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: 20%{?dist} +Release: 21%{?dist} Summary: Glasgow Haskell Compiler License: %BSDHaskellReport @@ -54,6 +54,8 @@ Patch14: ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch Patch15: ghc-64bit-bigendian-rts-hang-989593.patch # unversion library html docdirs Patch16: ghc-cabal-unversion-docdir.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 @@ -242,6 +244,8 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build %patch16 -p1 -b .orig +%patch17 -p0 -b .orig + %global gen_contents_index gen_contents_index.orig %if %{undefined without_haddock} if [ ! -f "libraries/%{gen_contents_index}" ]; then @@ -473,6 +477,11 @@ fi %changelog +* Wed Jan 29 2014 Jens Petersen - 7.6.3-21 +- 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 - 7.6.3-20 - enable debuginfo for C code bits (#989593) - back to production build