[GHC] #14959: Heap overflow in optimizer
GHC
ghc-devs at haskell.org
Wed Mar 21 17:55:19 UTC 2018
#14959: Heap overflow in optimizer
-------------------------------------+-------------------------------------
Reporter: darchon | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
The `-ddump-rule-rewrites` output for this program is rather interesting:
{{{
$ ghc -O -fforce-recomp -ddump-rule-rewrites Bug.hs
[1 of 1] Compiling Test ( Bug.hs, Bug.o )
<elided>
Rule fired
Rule: ==#
Module: (BUILTIN)
Before: GHC.Prim.==# ValArg x_a2Lu ValArg 9223372036854775807#
After: case x_a2Lu of wild_00 {
__DEFAULT -> 0#;
9223372036854775807# -> 1#
}
Cont: StrictArg GHC.Prim.tagToEnum#
Select nodup wild1_a2Lw
Stop[RhsCtxt] [GHC.Integer.Type.Integer]
-> GHC.Integer.Type.Integer ->
GHC.Integer.Type.Integer
Rule fired
Rule: tagToEnum#
Module: (BUILTIN)
Before: GHC.Prim.tagToEnum# TyArg GHC.Types.Bool ValArg 0#
After: GHC.Types.False
Cont: Select ok wild1_a2Lw
Stop[BoringCtxt] [GHC.Integer.Type.Integer]
-> GHC.Integer.Type.Integer ->
GHC.Integer.Type.Integer
Rule fired
Rule: tagToEnum#
Module: (BUILTIN)
Before: GHC.Prim.tagToEnum# TyArg GHC.Types.Bool ValArg 1#
After: GHC.Types.True
Cont: Select ok wild1_a2Lw
Stop[BoringCtxt] [GHC.Integer.Type.Integer]
-> GHC.Integer.Type.Integer ->
GHC.Integer.Type.Integer
Rule fired
Rule: bitInteger
Module: (BUILTIN)
Before:ghc: Out of memory
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14959#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list