#10571: GHC 7.10.1 segfaults when shiftL-ing Integers by negative amounts ----------------------------------+-------------------------------------- Reporter: anders_ | Owner: Type: bug | Status: closed Priority: high | Milestone: Component: Compiler | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): ----------------------------------+-------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"182c44da50db028a432a81789048c87922bd30f4/ghc" 182c44da/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="182c44da50db028a432a81789048c87922bd30f4" Keep `shift{L,R}` on `Integer` from segfaulting This can happen because the underlying primitive operations in `integer-gmp` don't support negative shift-amounts, and since `integer-gmp` can't throw proper exceptions and just provides a low-level API, it simply segfaults instead... This patch simply removes the `shift{L,R}` method definitions (and defines `unsafeShift{L,R}` instead) whose default-impls fallback on using `shift` which properly handles negative shift arguments. This addresses #10571 Test Plan: harbormaster can do it Reviewers: hvr, austin, rwbarton Subscribers: rwbarton, thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1018 GHC Trac Issues: #10571 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10571#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler