[GHC] #15906: Stable name allocation causes heap corruption when GC is triggered in the primop

GHC ghc-devs at haskell.org
Wed Nov 21 17:30:23 UTC 2018


#15906: Stable name allocation causes heap corruption when GC is triggered in the
primop
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.6.3
       Component:  Runtime System    |              Version:  8.7
      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:D5342
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ömer Sinan Ağacan <omeragacan@…>):

 In [changeset:"691aa715cf43bf9d88ee32bca37e471bae35adfb/ghc"
 691aa715/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="691aa715cf43bf9d88ee32bca37e471bae35adfb"
 Fix heap corruption during stable name allocation

 See #15906 for the problem. To fix we simply call `allocate()` instead of
 `ALLOC_PRIM()`. `allocate()` does not trigger GC when the nursery is full,
 instead it extends it.

 Test Plan:
 This validates. memo001 now passes with `-debug` compile parameter. I'll
 add
 another test that runs memo001 with `-debug` once I figure out how to use
 stdout files for multiple tests.

 Reviewers: simonmar, bgamari, erikd

 Reviewed By: simonmar

 Subscribers: rwbarton, carter

 GHC Trac Issues: #15906

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

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


More information about the ghc-tickets mailing list