[GHC] #13330: forkIO has inconsistent behavior under optimization
GHC
ghc-devs at haskell.org
Tue Apr 3 23:48:06 UTC 2018
#13330: forkIO has inconsistent behavior under optimization
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.2.1
Component: Core Libraries | Version: 8.1
Resolution: fixed | Keywords: Exceptions
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3189
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I'm looking at this exception-semantics stuff again,
as I try to make sense of the nested CPR stuff #1600 and Phab:D4244.
I'm puzzled.
* The strrictness analyser has quite a bit of complexity around
`ThrowsExn`.
* `ThrowsExn` only differs from `Diverges` if the `ExnStr` flag is set to
`ExnStr`
* And the only place that happens is in `Demand.catchArgDmd`
* The only place `catchArgDmd` is used is in `primops.txt.pp`.
Originally, in the patch for #11222, `catchArgDmd` was used for the first
arg of `catch#`, `catchSTM#` and `catchRetry#`.
* But the patch in this ticket removed two of those three; now only
`catchRetry#` uses the `catchArgDmd` thing.
It loosk t me as if `catchRetry#` was left out by mistake. Right, David?
And if so, that's the last use of `catchArgDmd` and I think that all the
tricky `ThrowsExn` machinery can disappear.
Incidentally, here's the amazing history of the strictness of `catch#`
* Dec 13: 0558911f91c: catch# gets a strictness signature with
`lazyApply1Dmd`
* Jul 15: 7c0fff41789: catch# goes from `lazyApply1Dmd` to
`strictApply1Dmd`
* Dec 15: 28638dfe79e: catch# goes from `strictApply1Dmd` to
`lazyApply1Dmd`. Trac #10712
* Jan 16: 9915b656440: catch# goes from `lazyApply1Dmd` to `catchArgDmd`,
and result goes from `botRes` to `exnRes` Trac #11222.
* Mar 17: 701256df88c: catch# goes from 'catchArgDmd` to `lazyApply1Dmd`.
This ticket #13330.
See also `Note [Strictness for mask/unmask/catch]` in `primops.txt/pp`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13330#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list