
#10571: GHC 7.10.1 segfaults when shiftL-ing Integers by negative amounts -------------------------------------+------------------------------------- Reporter: anders_ | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Runtime crash | (amd64) Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by rwbarton): * cc: hvr (added) * priority: normal => high Comment: The documentation for `shiftL` does say "the specified number of bits (which must be non-negative)", so the first case might be okay, but crashing is too much. The whole `shift`/`shiftL`/`shiftR` thing seems a little dubious to me in general, but surely for Integer we should test the sign of the shift in `shiftL`/`shiftR` and produce the expected result. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10571#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler