summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/TopHandler.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/GHC/TopHandler.hs')
-rw-r--r--libraries/base/GHC/TopHandler.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/libraries/base/GHC/TopHandler.hs b/libraries/base/GHC/TopHandler.hs
index ba86798091..6a4e0325a6 100644
--- a/libraries/base/GHC/TopHandler.hs
+++ b/libraries/base/GHC/TopHandler.hs
@@ -52,14 +52,13 @@ import Data.Dynamic (toDyn)
-- Note [rts_setMainThread must be called unsafely]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
-- rts_setMainThread must be called as unsafe, because it
-- dereferences the Weak# and manipulates the raw Haskell value
-- behind it. Therefore, it must not race with a garbage collection.
+
-- Note [rts_setMainThread has an unsound type]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
-- 'rts_setMainThread' is imported with type Weak# ThreadId -> IO (),
-- but this is an unsound type for it: it grabs the /key/ of the
-- 'Weak#' object, which isn't tracked by the type at all.
@@ -212,9 +211,9 @@ disasterHandler exit _ =
"encode an error message. Check that your locale is configured " ++
"properly."
-{- Note [Disaster with iconv]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
+{-
+Note [Disaster with iconv]
+~~~~~~~~~~~~~~~~~~~~~~~~~~
When using iconv, it's possible for things like iconv_open to fail in
restricted environments (like an initram or restricted container), but
when this happens the error raised inevitably calls `peekCString`,