[GHC] #14036: GHCi HEAD segfaults upon startup with a prof build

GHC ghc-devs at haskell.org
Sun Sep 17 02:41:02 UTC 2017


#14036: GHCi HEAD segfaults upon startup with a prof build
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3983
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by dfeuer):

 * status:  new => patch
 * differential:   => Phab:D3983


Comment:

 I found the problem.

 {{{#!hs
  arity <= TAG_MASK ? obj + arity : obj,
 }}}

 That addition is ''pointer'' addition, which changes all the wrong bits.
 We need to cast the `obj` to an integer before adding.

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


More information about the ghc-tickets mailing list