Bug#842780: Fix SIGBUS on sparc64

James Clarke jrtc27 at jrtc27.com
Tue Nov 1 08:50:50 UTC 2016


Source: ghc
Version: 8.0.1-8
Severity: important
Tags: patch
X-Debbugs-Cc: debian-sparc at lists.debian.org
User: debian-sparc at lists.debian.org
Usertags: sparc64

Hi,
Please find attached a patch to ensure GHC does not perform unaligned
accesses on sparc64 (and sparc if native code gen is disabled, but
there's no sparc64 native code gen support). This is currently blocking
all of Haskell on sparc64.

Regards,
James
-------------- next part --------------
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -1114,6 +1114,8 @@ cLoad expr rep
           bewareLoadStoreAlignment ArchMipsel   = True
           bewareLoadStoreAlignment (ArchARM {}) = True
           bewareLoadStoreAlignment ArchARM64    = True
+          bewareLoadStoreAlignment ArchSPARC    = True
+          bewareLoadStoreAlignment ArchSPARC64  = True
           -- Pessimistically assume that they will also cause problems
           -- on unknown arches
           bewareLoadStoreAlignment ArchUnknown  = True
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20161101/7ae40fda/attachment-0001.sig>


More information about the Pkg-haskell-maintainers mailing list