unexpected uncaught segmentation error in arbitrary precision Integer calculations with modestly large numbers
In ghci 8.0.1 on my mac, expressions no bigger than 2^(10^7) :: Integer
usually cause a bus error; 2^(10^6)
is apparently OK. The force of "usually" is that every now and then they and larger expressions are fine, so it is not quite reproducible. I believe it's the Integer arithmetic library, rather than the exponentiation,
and I think it might be a stack overflow in libHSinteger-gmp-1.0.0.1-ghc8.0.1.dylib
The problem was first encountered with compiled code doing additions and multiplications on similarly sized Integer values. Substantially larger numbers can be handled by 7.8.4 on other platforms, which is all I have to compare it with.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |