[GHC] #11126: Entered absent arg in a Repa program
GHC
ghc-devs at haskell.org
Sun Oct 14 20:05:14 UTC 2018
#11126: Entered absent arg in a Repa program
-------------------------------------+-------------------------------------
Reporter: tuplanolla | Owner: bgamari
Type: bug | Status: patch
Priority: high | Milestone: 8.8.1
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3221
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Krzysztof Gogolewski <krz.gogolewski@…>):
In [changeset:"448b77b93b369745e9bfbc8b46a5b87bb73dd379/ghc"
448b77b9/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="448b77b93b369745e9bfbc8b46a5b87bb73dd379"
Add RubbishLit for absent bindings of UnliftedRep
Summary:
Trac #9279 reminded us that the worker wrapper transformation copes
really badly with absent unlifted boxed bindings.
As `Note [Absent errors]` in WwLib.hs points out, we can't just use
`absentError` for unlifted bindings because there is no bottom to hide
the error in.
So instead, we synthesise a new `RubbishLit` of type
`forall (a :: TYPE 'UnliftedRep). a`, which code-gen may subsitute for
any boxed value. We choose `()`, so that there is a good chance that
the program crashes instead instead of leading to corrupt data, should
absence analysis have been too optimistic (#11126).
Reviewers: simonpj, hvr, goldfire, bgamari, simonmar
Reviewed By: simonpj
Subscribers: osa1, rwbarton, carter
GHC Trac Issues: #15627, #9279, #4306, #11126
Differential Revision: https://phabricator.haskell.org/D5153
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11126#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list