<div dir="ltr">A quick google result shows this source file is likely where the issue actually exists:<div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><span style="color:rgb(34,34,34);font-family:arial"><a href="http://hackage.haskell.org/package/cryptohash-0.4/src/cbits/md5.c">http://hackage.haskell.org/package/cryptohash-0.4/src/cbits/md5.c</a></span><br>
</pre></div></div><div><span style="color:rgb(34,34,34);font-family:arial"><br></span></div><div>md5_update() -> md5_do_chunk().</div><div><br></div><div>This uses the macro cpu_to_le32_array(), which in turn comes to array_swap32():</div>
<div><br></div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">static inline void array_swap32(uint32_t *d, uint32_t *s, uint32_t nb)
{
        while (nb--)
                *d++ = swap32(*s++);
}</pre>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). I can write up a patch for it, but I'm not sure how to get it accepted upstream.<pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
<font face="arial, helvetica, sans-serif">Patrick</font></pre></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 29, 2014 at 10:08 AM, Joachim Breitner <span dir="ltr"><<a href="mailto:nomeata@debian.org" target="_blank">nomeata@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[Taking a few lists of the CC, no need to spam everyone.]<br>
<br>
Dear Patrick,<br>
<br>
Am Dienstag, den 29.04.2014, 09:41 -0500 schrieb Patrick Baggett:<br>
<div class=""><br>
> I'd like to look into the TLS failures. Bus errors usually mean<br>
> "misaligned data" which aren't very difficult to fix once you see the<br>
> source code. Is there a bug report for the SPARC failure? Help me<br>
> reproduce it on my local machine and I think I should be able to fix<br>
> it soon!<br>
<br>
</div>that would be great! But note that you might have to dive into the depth<br>
of the Haskell compiler GHC.<br>
<br>
To reproduce, simply try to build haskell-tls. I was able to reproduce<br>
it on the porter machine.<br>
<br>
I filed <a href="https://bugs.debian.org/744920" target="_blank">https://bugs.debian.org/744920</a> and<br>
<a href="https://ghc.haskell.org/trac/ghc/ticket/9002" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/9002</a> for them.<br>
<div class="HOEnZb"><div class="h5"><br>
Greetings,<br>
Joachim<br>
<br>
<br>
--<br>
Joachim "nomeata" Breitner<br>
Debian Developer<br>
  <a href="mailto:nomeata@debian.org">nomeata@debian.org</a> | ICQ# 74513189 | GPG-Keyid: F0FBF51F<br>
  JID: <a href="mailto:nomeata@joachim-breitner.de">nomeata@joachim-breitner.de</a> | <a href="http://people.debian.org/~nomeata" target="_blank">http://people.debian.org/~nomeata</a><br>
<br>
</div></div></blockquote></div><br></div>