[GHC] #13857: compactAdd doesn't work with SmallArray#

GHC ghc-devs at haskell.org
Sun May 20 15:42:58 UTC 2018


#13857: compactAdd doesn't work with SmallArray#
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.3
       Component:  Runtime System    |              Version:  8.2.1-rc2
      Resolution:                    |             Keywords:  compact
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3888,
       Wiki Page:                    |  Phab:D4702
-------------------------------------+-------------------------------------

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

 In [changeset:"12deb9a97c05ad462ef04e8d2062c3d11c52c6ff/ghc" 12deb9a/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="12deb9a97c05ad462ef04e8d2062c3d11c52c6ff"
 rts: Fix compaction of SmallMutArrPtrs

 This was blatantly wrong due to copy-paste blindness:

  * labels were shadowed, which GHC doesn't warn about(!), resulting in
    plainly wrong behavior
  * the sharing check was omitted
  * the wrong closure layout was being used

 Moreover, the test wasn't being run due to its primitive dependency, so
 I didn't even notice. Sillyness.

 Test Plan: install `primitive`, `make test TEST=compact_small_array`

 Reviewers: simonmar, erikd

 Reviewed By: simonmar

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #13857.

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

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


More information about the ghc-tickets mailing list