FW: [GHC] #8035: STM transaction left open if there is an orElse on the path between throwSTM and catchSTM
Simon Peyton-Jones
simonpj at microsoft.com
Thu Jul 4 09:08:28 CEST 2013
Dear Tim
Might you have a moment to verify this guy's STM bug report and fix?
Thanks
Simon
-----Original Message-----
From: ghc-tickets-bounces at haskell.org [mailto:ghc-tickets-bounces at haskell.org] On Behalf Of GHC
Sent: 03 July 2013 22:11
Cc: ghc-tickets at haskell.org
Subject: [GHC] #8035: STM transaction left open if there is an orElse on the path between throwSTM and catchSTM
#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
_______________________________________________
ghc-tickets mailing list
ghc-tickets at haskell.org
http://www.haskell.org/mailman/listinfo/ghc-tickets
More information about the ghc-devs
mailing list