
#13916: Optimizations create run time seg faults -------------------------------------+------------------------------------- Reporter: newthin | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.2.2 Component: Compiler | Version: 8.0.2 (CodeGen) | Resolution: | Keywords: optimization Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): It turns out the simplified Core output for `s6tv` is even crazier, {{{#!hs let sat_s6tv [Occ=Once] :: GHC.Prim.State# GHC.Prim.RealWorld -> (# GHC.Prim.State# GHC.Prim.RealWorld, Data.Either.Either env_a3xy () #) [LclId] sat_s6tv = \ (s1_s6tt [Occ=Once, OS=OneShot] :: GHC.Prim.State# GHC.Prim.RealWorld) -> srcBracket.hs:99:40-68 srcBracket.hs:92:34-39 srcBracket.hs:62:47-52 case Bracket.$wtakeEnv @ env_a3xy ww1_s6tk ww2_s6tl ww3_s6tm s1_s6tt of {} } in }}} It seems that somehow the strictness analyser has concluded that `takeEnv` diverges as its strictness signature is, {{{ takeEnv_s5fz :: forall env. Vector (TMVar env) -> GHC.Prim.State# GHC.Prim.RealWorld -> (# GHC.Prim.State# GHC.Prim.RealWorld, env #) [LclId, Arity=2, Str=b, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [20 0] 126 0}] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13916#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler