[commit: packages/base] master: GHC.Conc.Sync: Pass TSO to stackOverflow (0cfba06)
git at git.haskell.org
git at git.haskell.org
Sun Sep 8 10:56:53 CEST 2013
Repository : ssh://git@git.haskell.org/base
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0cfba06e09cae209c6fc1f94edd815ccf5a7e9d7/base
>---------------------------------------------------------------
commit 0cfba06e09cae209c6fc1f94edd815ccf5a7e9d7
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Sat Sep 7 18:16:52 2013 -0400
GHC.Conc.Sync: Pass TSO to stackOverflow
Signed-off-by: Austin Seipp <aseipp at pobox.com>
>---------------------------------------------------------------
0cfba06e09cae209c6fc1f94edd815ccf5a7e9d7
GHC/Conc/Sync.lhs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/GHC/Conc/Sync.lhs b/GHC/Conc/Sync.lhs
index 135c1fe..4832740 100644
--- a/GHC/Conc/Sync.lhs
+++ b/GHC/Conc/Sync.lhs
@@ -764,7 +764,9 @@ sharedCAF a get_or_set =
deRefStablePtr (castPtrToStablePtr (castPtr ref2))
reportStackOverflow :: IO ()
-reportStackOverflow = callStackOverflowHook
+reportStackOverflow = do
+ ThreadId tid <- myThreadId
+ callStackOverflowHook tid
reportError :: SomeException -> IO ()
reportError ex = do
@@ -774,7 +776,7 @@ reportError ex = do
-- SUP: Are the hooks allowed to re-enter Haskell land? If so, remove
-- the unsafe below.
foreign import ccall unsafe "stackOverflow"
- callStackOverflowHook :: IO ()
+ callStackOverflowHook :: ThreadId# -> IO ()
{-# NOINLINE uncaughtExceptionHandler #-}
uncaughtExceptionHandler :: IORef (SomeException -> IO ())
More information about the ghc-commits
mailing list