vincenthz / hs-cryptohash

efficient and practical cryptohashing in haskell. DEPRECATED in favor of cryptonite
Other
30 stars 24 forks source link

Segmentation fault when computing 512bit SHA3 hash #18

Closed wereHamster closed 10 years ago

wereHamster commented 10 years ago

I have roughly the following code:

return $ BS8.unpack $ BS16.encode $ SHA3.hashlazy 512 contents

And it consistently throws a Segmentation fault exception. The stacktrace indicates that it happens in sha3_finalize:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff68e57cd in memset () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff68e57cd in memset () from /usr/lib/libc.so.6
#1  0x0000000000866af9 in sha3_finalize ()
#2  0x000000000085fc36 in s6PC_info ()
#3  0x0000000000000000 in ?? ()

The content was 141679296 bytes long, which is divisible by 8.

vincenthz commented 10 years ago

Thanks, it's now fixed in 0.11.2