Commit 67c0a98a authored by Ben Gamari's avatar Ben Gamari Committed by thoughtpolice
Browse files

GHC.Conc.Sync: Pass TSO to stackOverflow


Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
parent 28cf2e00
......@@ -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 ())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment