[GHC] #5902: Cannot tell from an exception handler whether the exception was asynchronous
GHC
cvs-ghc at haskell.org
Fri May 3 12:46:52 CEST 2013
#5902: Cannot tell from an exception handler whether the exception was
asynchronous
---------------------------------+------------------------------------------
Reporter: simonmar | Owner: simonmar
Type: bug | Status: new
Priority: high | Milestone: 7.8.1
Component: Compiler | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonmar):
Any time there's a catch/rethrow inside an `unsafePerformIO` we'll have
this problem. So in the specific case of the GHC API it would help to
know where this is happening, and whether we can avoid it.
One way I can think of that might help in general is to have a special
kind of catch that doesn't catch asynchronous exceptions. So in cases
like your example, `catchIOError` would use the special sync-only catch
internally, and would ignore the async exception.
However, this unfortunately doesn't help with `bracket` and `finally`,
which need to do some cleanup in the exception handler, and I suspect
these are more common than `catch`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5902#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list