[GHC] #9306: Crash when shifting Integers too much

GHC ghc-devs at haskell.org
Sun Jul 13 08:07:18 UTC 2014


#9306: Crash when shifting Integers too much
------------------------------------+-------------------------------------
       Reporter:  dfeuer            |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  libraries/base    |           Version:  7.8.3
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  Runtime crash
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 When shifting an Integer by `fromIntegral (maxBound::Int) + 2` or more,
 the RTS crashes. The attached program gives the following output (on
 x86_64, at least):

 [dfeuer at lemur src]$ ./shiftcrash
 Okay 0
 gmp: overflow in mpz type
 Aborted

 I found the bug in 7.6.3, but it's been verified to be present also in
 7.8.3. The crash also occurs when running similar code in GHCi.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9306>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list