[commit: packages/base] master: GHC.Conc.Sync: Pass TSO to stackOverflow (960f9ac)
git at git.haskell.org
git at git.haskell.org
Fri Oct 25 14:23:17 UTC 2013
Repository : ssh://git@git.haskell.org/base
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/960f9ac10c8145410adb6ddd36dc7e3af7a7fb44/base
>---------------------------------------------------------------
commit 960f9ac10c8145410adb6ddd36dc7e3af7a7fb44
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Sat Sep 7 18:16:52 2013 -0400
GHC.Conc.Sync: Pass TSO to stackOverflow
>---------------------------------------------------------------
960f9ac10c8145410adb6ddd36dc7e3af7a7fb44
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 42d6c3d..ebb7226 100644
--- a/GHC/Conc/Sync.lhs
+++ b/GHC/Conc/Sync.lhs
@@ -773,7 +773,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
@@ -783,7 +785,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