[GHC] #14171: STM causes program to suddenly exit
GHC
ghc-devs at haskell.org
Wed Sep 13 20:54:40 UTC 2017
#14171: STM causes program to suddenly exit
----------------------------------+----------------------------------------
Reporter: MichaelBurge | Owner: bgamari
Type: bug | Status: patch
Priority: highest | Milestone: 8.4.1
Component: libraries/stm | Version: 8.2.1
Resolution: | Keywords:
Operating System: Linux | Architecture: Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: #8091 | Differential Rev(s): Phab:D3919
Wiki Page: |
----------------------------------+----------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"10a1a4781c646f81ca9e2ef7a2585df2cbe3a014/ghc" 10a1a47/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="10a1a4781c646f81ca9e2ef7a2585df2cbe3a014"
Model divergence of retry# as ThrowsExn, not Diverges
The demand signature of the retry# primop previously had a Diverges
result. However, this caused the demand analyser to conclude that a
program of the shape,
catchRetry# (... >> retry#)
would diverge. Of course, this is plainly wrong; catchRetry#'s sole
reason to exist is to "catch" the "exception" thrown by retry#. While
catchRetry#'s demand signature correctly had the ExnStr flag set on its
first argument, indicating that it should catch divergence, the logic
associated with this flag doesn't apply to Diverges results. This
resulted in #14171.
The solution here is to treat the divergence of retry# as an exception.
Namely, give it a result type of ThrowsExn rather than Diverges.
Updates stm submodule for tests.
Test Plan: Validate with T14171
Reviewers: simonpj, austin
Subscribers: rwbarton, thomie
GHC Trac Issues: #14171, #8091
Differential Revision: https://phabricator.haskell.org/D3919
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14171#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list