FastMutInt allocates too large a buffer
In !4817 (closed) @trac-vdukhovni noticed that FastMutInt
has a subtle (but benign) bug. newFastMutInt
is currently defined as:
newFastMutInt = IO $ \s ->
case newByteArray# size s of { (# s, arr #) ->
(# s, FastMutInt arr #) }
where !(I# size) = finiteBitSize (0 :: Int)
On a 64-bit platform this allocates a 64-byte ByteArray#
to hold an 8-byte value.
As noted in !4817 (closed), we need to be a bit careful when fixing this due to cross-compilation.