[GHC] #7988: Big integers crashing integer-simple on qnxnto-arm

GHC ghc-devs at haskell.org
Sun Jun 16 23:42:40 CEST 2013


#7988: Big integers crashing integer-simple on qnxnto-arm
--------------------------+-------------------------------------------------
Reporter:  singpolyma     |          Owner:          
    Type:  bug            |         Status:  new     
Priority:  normal         |      Component:  Compiler
 Version:  7.7            |       Keywords:          
      Os:  QNX            |   Architecture:  arm     
 Failure:  Runtime crash  |      Blockedby:          
Blocking:                 |        Related:          
--------------------------+-------------------------------------------------

Comment(by singpolyma):

 After investigating the implementation of show, I found that this code
 crashes:


 {{{
 module Main(main) where

 baseSize :: Integer -> Integer -> Integer
 baseSize b n
         | b > n = b
         | otherwise = baseSize (b*b) n

 main :: IO ()
 main = const (print "hai") $! (baseSize 10 x)
         where
         x =
 1698216411723896409370956367776721179318889450455041827132718974302741878390837321432336343675633162549250403315806029427905299244190312372579926940475451888030543254407027920097356585782249367443143296233998628534271615889944780380009575830360494452127505602946479721077003306484033949323735282887061381017308661295420018127960945040527799453575550182103049893404974649358451806070426466909207870357151749213825117327459319757188684800053173535698484546183314257496993550197629263841239094688141806902228982225567857168534229309067360843970641718946428250184145865749
 }}}
 29919999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7988#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list