Skip to content

ghci triggers 'ASSERT failed! file compiler/ghci/Linker.lhs, line 906'

Found by ./validate --slow:

Unexpected failures:
   ghci/scripts  ghci044 [bad stderr] (ghci)
   ghci/scripts  ghci047 [bad stderr] (ghci)

# run manially:
$ LANG=C make fulltest stage=2 TEST="ghci044 ghci047"

=====> ghci047(ghci) 87 of 4083 [0, 1, 0] 
cd ./ghci/scripts && HC='/home/st/fun/ghc/inplace/bin/ghc-stage2' HC_OPTS='-dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history ' '/home/st/fun/ghc/inplace/bin/ghc-stage2' --interactive -v0 -ignore-dot-ghci -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history     <ghci047.script >ghci047.run.stdout 2>ghci047.run.stderr
Actual stderr output differs from expected:
--- ./ghci/scripts/ghci047.stderr       2014-07-31 12:05:34.000000000 +0300
+++ ./ghci/scripts/ghci047.run.stderr   2014-08-08 16:58:01.000000000 +0300
@@ -1,16 +1,14 @@
+*** Exception: ASSERT failed! file compiler/ghci/Linker.lhs, line 906
+*** Exception: ASSERT failed! file compiler/ghci/Linker.lhs, line 906
 
-<interactive>:38:1:
-    Couldn't match type ‘HFalse’ with ‘HTrue’
-    Expected type: HTrue
-      Actual type: Or HFalse HFalse
-    In the expression: f
-    In the expression: f $ Baz 'a'
-    In an equation for ‘it’: it = f $ Baz 'a'
-
-<interactive>:39:1:
-    Couldn't match type ‘HFalse’ with ‘HTrue’
-    Expected type: HTrue
-      Actual type: Or HFalse HFalse
-    In the expression: f
-    In the expression: f $ Quz
-    In an equation for ‘it’: it = f $ Quz
+<interactive>:36:1: Not in scope: ‘f’
+
+<interactive>:37:1: Not in scope: ‘f’
+
+<interactive>:38:1: Not in scope: ‘f’
+
+<interactive>:39:1: Not in scope: ‘f’
+
+<interactive>:40:1: Not in scope: ‘f’
+
+<interactive>:41:1: Not in scope: ‘f’
Actual stdout output differs from expected:
--- ./ghci/scripts/ghci047.stdout       2014-07-31 12:05:34.000000000 +0300
+++ ./ghci/scripts/ghci047.run.stdout   2014-08-08 16:58:01.000000000 +0300
@@ -1,4 +0,0 @@
-1
-1
-1
-1
*** unexpected failure for ghci047(ghci)

The trigger in compiler/ghci/Linker.lhs:906:

linkSomeBCOs dflags toplevs_only ie ce_in ul_bcos
   = do let nms = map unlinkedBCOName ul_bcos
        hvals <- fixIO
                    ( \ hvs -> let ce_out = extendClosureEnv ce_in (zipLazy nms hvs)
                               in  mapM (linkBCO dflags ie ce_out) ul_bcos )
        let ce_all_additions = zip nms hvals
            ce_top_additions = filter (isExternalName.fst) ce_all_additions
            ce_additions     = if toplevs_only then ce_top_additions
                                               else ce_all_additions
            ce_out = -- make sure we're not inserting duplicate names into the
                     -- closure environment, which leads to trouble.
{- 906 -}            ASSERT(all (not . (`elemNameEnv` ce_in)) (map fst ce_additions))
                     extendClosureEnv ce_in ce_additions
        return (ce_out, hvals)
Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information