[GHC] #13786: GHC panic with "cabal repl" / "stack repl" on GHC 8.0.2 and 7.8.3

GHC ghc-devs at haskell.org
Mon Jun 5 16:55:22 UTC 2017


#13786: GHC panic with "cabal repl" / "stack repl" on GHC 8.0.2 and 7.8.3
-------------------------------------+-------------------------------------
        Reporter:  ppelleti          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  8.0.2
  (Linker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * cc: angerman, Jaffacake, rwbarton (added)
 * component:  GHCi => Runtime System (Linker)


Comment:

 I actually wasn't quite correct. `ld` requires that **archives** be
 provided on the command line in topological order; that is if `libA`
 refers to `libB`, they must be provided in the order of `libB libA`
 (alternatively you can explicitly flag a group of archives as a recursive
 group using the `--start-group`/`--end-group` flags).

 However, it turns out that there is no such requirement of object files:
 it seems that you can give them in any order and `ld` will link them
 without any trouble. Unfortunately, this isn't true of GHCi's linker. We
 sequentially load one object file after another, failing if we encounter
 any undefined reference. Perhaps what we should instead do is load the
 objects as a group, first slurping in the symbol tables of each of them,
 and only afterwards try to resolve references. This will add some
 complexity, but will ensure that we offer the same ordering guarantees
 that `ld` currently provides.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13786#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list