#15673: heap overflow with Bits.shift and Integer -------------------------------------+------------------------------------- Reporter: mcmayer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: GHC doesn't work | (amd64) at all | Test Case: Blocked By: | Blocking: Related Tickets: #14959 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"d25fa45e377253cfbe26e410075dda9d58bb869c/ghc" d25fa45e/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="d25fa45e377253cfbe26e410075dda9d58bb869c" Fix constant-folding for Integer shifts In this patch commit 869f69fd4a78371c221e6d9abd69a71440a4679a Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Wed Dec 11 18:19:34 2013 +0000 Guarding against silly shifts we deal with silly shifts like (Sll 1 9223372036854775807). But I only dealt with primops that Int# and Word#. Alas, the same problem affects shifts of Integer, as Trac #15673 showed. Fortunately, the problem is easy to fix. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15673#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler