[Pkg-haskell-maintainers] Bug#744920: State of Haskell on sparc?

Joachim Breitner nomeata at debian.org
Tue Apr 29 15:44:52 UTC 2014


Hi,

Am Dienstag, den 29.04.2014, 10:31 -0500 schrieb Patrick Baggett:
> A quick google result shows this source file is likely where the issue
> actually exists:
> http://hackage.haskell.org/package/cryptohash-0.4/src/cbits/md5.c
> 
> 
> 
> md5_update() -> md5_do_chunk().
> 
> 
> This uses the macro cpu_to_le32_array(), which in turn comes to
> array_swap32():
> 
> 
> static inline void array_swap32(uint32_t *d, uint32_t *s, uint32_t nb)
> {
> 	while (nb--)
> 		*d++ = swap32(*s++);
> }
> This loads a uint32_t from *s, swaps the byte order, then stores into
> *d. If either *s or *d are not aligned pointers (i.e. low 2 bits of
> address are 0), then SPARC will generate a SIGBUS and crash. I would
> bet money that patching this function will resolve the issue (and
> probably other issues if this function is used elsewhere). 

Great!

> I can write up a patch for it, but I'm not sure how to get it accepted
> upstream.

Well, we can apply it locally first, of course. But I’m sure that the
original authors will be happy to receive it via
https://github.com/vincenthz/hs-cryptohash/issues

Greetings,
Joachim


-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20140429/a9e3d36a/attachment.sig>


More information about the Pkg-haskell-maintainers mailing list