[GHC] #9416: newArray# incorrectly inlines big arrays (overflow1.hs SIGSEGVS on ./validate --slow)

GHC ghc-devs at haskell.org
Wed Aug 6 14:50:22 UTC 2014


#9416: newArray# incorrectly inlines big arrays (overflow1.hs SIGSEGVS on
./validate --slow)
-------------------------------------+-------------------------------------
       Reporter:  slyfox             |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler           |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Easy (less than 1  |         Type of failure:
  hour)                              |  None/Unknown
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 Found by ./validate:

 '''testsuite/tests/rts/overflow1.hs''' SIGSEGVs due to integer overflow
 somewhere around
 [https://git.haskell.org/ghc.git/blob/c88559b3304cc5e142ab9c2655d48e570f81afeb:/compiler/codeGen/StgCmmPrim.hs#l138
 shouldInlinePrimOp]

 {{{#!hs
 ...
 shouldInlinePrimOp dflags NewByteArrayOp_Char [(CmmLit (CmmInt n _))]
     | fromInteger n <= maxInlineAllocSize dflags =
 ...
 }}}

 '''maxInlineAllocSize''' has ''':: Int''' type:

 {{{#!hs
 fromInteger (2^64 - 10) < (128 :: Int)
 True
 }}}

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


More information about the ghc-tickets mailing list