[commit: ghc] master: fix bus error (misaligned data access) on SPARC in __decodeDouble_Int64 (12a03c4)
git at git.haskell.org
git at git.haskell.org
Sun Mar 22 21:11:20 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/12a03c44c006f142f93980e0dbdfab0f73db042c/ghc
>---------------------------------------------------------------
commit 12a03c44c006f142f93980e0dbdfab0f73db042c
Author: Karel Gardas <karel.gardas at centrum.cz>
Date: Sun Mar 22 21:58:03 2015 +0100
fix bus error (misaligned data access) on SPARC in __decodeDouble_Int64
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D749
>---------------------------------------------------------------
12a03c44c006f142f93980e0dbdfab0f73db042c
rts/StgPrimFloat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rts/StgPrimFloat.c b/rts/StgPrimFloat.c
index e2eeee5..277ae66 100644
--- a/rts/StgPrimFloat.c
+++ b/rts/StgPrimFloat.c
@@ -182,9 +182,9 @@ __decodeDouble_Int64 (StgInt64 *const mantissa, const StgDouble dbl)
I_ exp = 0;
__decodeDouble_2Int (&man_sign, &man_high, &man_low, &exp, dbl);
-
- *mantissa = ((((StgInt64)man_high << 32) | (StgInt64)man_low)
- * (StgInt64)man_sign);
+ ASSIGN_Int64((W_*)mantissa, ((((StgInt64)man_high << 32)
+ | (StgInt64)man_low)
+ * (StgInt64)man_sign));
return exp;
#endif
}
More information about the ghc-commits
mailing list