[GHC] #8035: STM transaction left open if there is an orElse on the path between throwSTM and catchSTM
GHC
ghc-devs at haskell.org
Wed Jul 3 23:10:51 CEST 2013
#8035: STM transaction left open if there is an orElse on the path between
throwSTM and catchSTM
-----------------------------+----------------------------------------------
Reporter: errge | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 7.7 | Keywords: stm rts
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Runtime crash | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
{{{
main = join $ atomically $ do
catchSTM
(throwSTM ThreadKilled `orElse` return (putStrLn "wtf"))
(\(e::SomeException) -> return (putStrLn "ok"))
}}}
This program crashes with a segmentation fault. Tested with GHC HEAD.
I attach the testcase and my proposed fix for the issue. I've run the
fast testsuite with the proposed fix without new defects. On the other
hand I'm very new to GHC, so while I'm sure in the defect and the test,
the fix may be bogus.
Thanks goes to Mihály Bárász for discovering the issue.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/8035>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list