summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2018-05-10 11:13:37 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2018-05-10 11:53:09 +0300
commitb2ff5dde399cd012218578945ada1d9ff68daa35 (patch)
tree730a83ea4b91622894412f7882d5b2f1d5c7c6f2 /libraries/base
parent5fe6aaa3756cda654374ebfd883fa8f064ff64a4 (diff)
downloadhaskell-b2ff5dde399cd012218578945ada1d9ff68daa35.tar.gz
Fix #15038
We introduce a new Id for unused pointer values in unboxed sums that is not CAFFY. Because the Id is not CAFFY it doesn't make non-CAFFY definitions CAFFY, fixing #15038. To make sure anything referenced by the new id will be retained we get a stable pointer to in on RTS startup. Test Plan: Passes validate Reviewers: simonmar, simonpj, hvr, bgamari, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15038 Differential Revision: https://phabricator.haskell.org/D4680
Diffstat (limited to 'libraries/base')
-rw-r--r--libraries/base/Control/Exception/Base.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/libraries/base/Control/Exception/Base.hs b/libraries/base/Control/Exception/Base.hs
index e675e0c017..4b5d94ece7 100644
--- a/libraries/base/Control/Exception/Base.hs
+++ b/libraries/base/Control/Exception/Base.hs
@@ -95,7 +95,7 @@ module Control.Exception.Base (
-- * Calls for GHC runtime
recSelError, recConError, runtimeError,
nonExhaustiveGuardsError, patError, noMethodBindingError,
- absentError, typeError,
+ absentError, absentSumFieldError, typeError,
nonTermination, nestedAtomically,
) where
@@ -398,3 +398,7 @@ nonTermination = toException NonTermination
-- GHC's RTS calls this
nestedAtomically :: SomeException
nestedAtomically = toException NestedAtomically
+
+-- Introduced by unarise for unused unboxed sum fields
+absentSumFieldError :: a
+absentSumFieldError = absentError " in unboxed sum."#