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

GHC ghc-devs at haskell.org
Wed May 16 14:38:50 UTC 2018


#13857: compactAdd doesn't work with SmallArray#
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.2.2
       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:                    |
-------------------------------------+-------------------------------------

Comment (by andrewthad):

 In fact, if we correct the test in GHC's test suite, we can see that it
 fails as well:

 {{{
 import GHC.Compact
 import Data.Primitive.SmallArray

 main :: IO ()
 main = do
     arr <- newSmallArray 5 (Just 'a') >>= unsafeFreezeSmallArray
     arr' <- compact arr
     putStrLn "done"
 }}}

 This fails with:

 {{{
 compact_hash_map: out of memory
 }}}

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


More information about the ghc-tickets mailing list