[GHC] #7695: Hang when locale-archive and gconv-modules are not there

GHC ghc-devs at haskell.org
Thu May 28 21:20:05 UTC 2015


#7695: Hang when locale-archive and gconv-modules are not there
-------------------------------------+-------------------------------------
        Reporter:  hpd               |                   Owner:
            Type:  bug               |                  Status:  patch
        Priority:  highest           |               Milestone:  7.10.2
       Component:  None              |                 Version:  7.8.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime crash     |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:  #8977, #10298     |                Blocking:
                                     |  Differential Revisions:  Phab:D898
-------------------------------------+-------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"e28462de700240288519a016d0fe44d4360d9ffd/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="e28462de700240288519a016d0fe44d4360d9ffd"
 base: fix #10298 & #7695

 Summary:
 This applies a patch from Reid Barton and Sylvain Henry, which fix a
 disasterous infinite loop when iconv fails to load locale files, as
 specified in #10298.

 The fix is a bit of a hack but should be fine - for the actual reasoning
 behind it, see `Note [Disaster and iconv]` for more info.

 In addition to this fix, we also patch up the IO Encoding utilities to
 recognize several variations of the 'ASCII' encoding (including its
 aliases) directly so that GHC can do conversions without iconv. This
 allows a static binary to sit in an initramfs.

 Authored-by: Reid Barton <rwbarton at gmail.com>
 Authored-by: Sylvain Henry <hsyl20 at gmail.com>
 Signed-off-by: Austin Seipp <austin at well-typed.com>

 Test Plan: Eyeballed it.

 Reviewers: rwbarton, hvr

 Subscribers: bgamari, thomie

 Differential Revision: https://phabricator.haskell.org/D898

 GHC Trac Issues: #10298, #7695
 }}}

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


More information about the ghc-tickets mailing list