[GHC] #13767: GHCi trips -DS checks at rts/sm/Sanity.c, line 210

GHC ghc-devs at haskell.org
Mon Jul 3 22:58:31 UTC 2017


#13767: GHCi trips -DS checks at rts/sm/Sanity.c, line 210
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  8.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3680
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"f9c6d53fe997f1c560cda6f346f4b201711df37c/ghc" f9c6d53/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="f9c6d53fe997f1c560cda6f346f4b201711df37c"
 Tag the FUN before making a PAP (#13767)

 Pointers to FUNs are not guaranteed to be tagged in general, because
 the compiler doesn't always know the arity of a FUN when it needs to
 reference it, e.g. with -O0 when the function is in another module.

 However, there's one case where we can put the correct tag on a FUN:
 when it is referenced by a PAP, because when building the PAP we know
 the arity and we can tag the pointer correctly.  The AutoApply code
 does this, and the sanity checker checks it, but the interpreter did
 not respect this invariant.  This patch fixes it.

 Test Plan:
 ```
 (cd ghc && make 2 GhcDebugged=YES)
 ./inplace/bin/ghc-stage2 --interpreter +RTS -DS
 ```

 Reviewers: niteria, bgamari, austin, erikd

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie

 GHC Trac Issues: #13767

 Differential Revision: https://phabricator.haskell.org/D3680
 }}}

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


More information about the ghc-tickets mailing list