Skip to content

Segmentation fault in floor function

The floor function crashes with a segmentation fault in GHCi with a negative, non-integer-valued, Double argument. It does not crash for any of the positive arguments or negative integer arguments I tried. It does not crash with a Float. It does not crash in compiled code.

To reproduce, run floor (-0.5) in GHCi.

Trac metadata
Trac field Value
Version 7.4.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information