raaz-crypto / raaz

Cryptographic library for Haskell
Apache License 2.0
68 stars 24 forks source link

Raaz executable segfaults #377

Closed piyush-kurur closed 5 years ago

piyush-kurur commented 6 years ago

This is a bug that seems to have a stink of a buffer overflow. On my desktop the following command

raaz entropy > /dev/null

segfaults. However curiously it does not segfault when the redirection to /dev/null is not present. Also it does not segfault when given an argument (like raaz entropy 1000000 > /dev/null). The corresponding raaz rand > /dev/null works okey.

piyush-kurur commented 6 years ago

Seems like the segfault occurs only with ghc-8.4.1.

piyush-kurur commented 6 years ago

Infact it looks like this occurs only when you interleave builds with two different compiler version. That is when I first build using say ghc-8.2 and then using 8.4 or some crazy combination. So it has probably got to do with the C part of the code not getting properly linked @hvr any comments ?

piyush-kurur commented 5 years ago

Closing this at it was a false alarm

piyush-kurur commented 5 years ago

This seems to be a ghc-8.4.3 issue. Other applications have also seen this problem.

https://ghc.haskell.org/trac/ghc/ticket/15260