[GHC] #10538: Simpilifier produces empty case in core, segfaults at runtime.
GHC
ghc-devs at haskell.org
Wed Jun 17 15:45:57 UTC 2015
#10538: Simpilifier produces empty case in core, segfaults at runtime.
-------------------------------------+-------------------------------------
Reporter: sopvop | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2-rc1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
In attachment is a cabal project which builds program producing segfault.
Bug is affected by inlining, so test had to be split into modules.
Otherwise bug did not occur, and NOINLINE pragmas didn't seem to help.
Can probably be simplified much more, right now it requires some basic
packages.
Inspecting the core I've found that code for `r` in `main` ends with empty
`case`, but should end with match on Either constructors with `show`.
It fails on 7.10.1 and 7.10.2-rc1. Works on 7.8.3.
It seems to be affected by inlining. For example inlining validateJson
from Validator/Aeson.hs helps.
Is also seems to be affected by specializing functions in Main.hs to
Indentity monad.
For convenience I've also put test case to
https://github.com/sopvop/failidator
failit.sh will init sandbox, install deps, build executable and run it.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10538>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list