[GHC] #8935: Obscure linker bug leads to crash in GHCi

GHC ghc-devs at haskell.org
Sat Oct 18 11:16:32 UTC 2014


#8935: Obscure linker bug leads to crash in GHCi
-------------------------------------+-------------------------------------
              Reporter:  simonmar    |            Owner:  trommler
                  Type:  bug         |           Status:  new
              Priority:  high        |        Milestone:  7.10.1
             Component:  Runtime     |          Version:  7.8.1-rc2
  System                             |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Rocket Science
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  GHCi crash  |  Related Tickets:  #9186, #9480
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by trommler):

 * owner:  simonmar => trommler


Comment:

 I have a fix for [changeset:2f8b4c9330b455d4cb31c186c747a7db12a69251] that
 validates and also does not introduce the regression reported in #9186.
 I'll clean up the patch and post it on phabricator.

 Analysis:
 On some systems the order of linker options and especially the order
 libraries are passed to `ld` matters. That behaviour is caused by a patch
 binutils to change the default of `--no-as-needed` to `--as-needed`. The
 library ordering issue is the reason for the regression we saw in #9186.

 On openSUSE you can control the default behaviour of `ld` by setting
 `SUSE_ASNEEDED=1` in the environment. Given the name of the environment
 variable I doubt it works on other distributions :-)

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


More information about the ghc-tickets mailing list