[GHC] #12469: Memory fence on writes to MutVar/Array missing on ARM

GHC ghc-devs at haskell.org
Fri Sep 9 08:05:09 UTC 2016


#12469: Memory fence on writes to MutVar/Array missing on ARM
-------------------------------------+-------------------------------------
        Reporter:  rrnewton          |                Owner:  trommler
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.2
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  memory model
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:  12537
 Related Tickets:                    |  Differential Rev(s):  Phab:D2495
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by trommler):

 * owner:   => trommler


Comment:

 It seems there is a write barrier missing here in `StgCmmPrim.hs`:
 {{{
        emit (setInfo addr (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))
   -- the write barrier.  We must write a byte into the mark table:
   -- bits8[a + header_size + StgMutArrPtrs_size(a) + x >> N]
        emit $ mkStore (
 }}}

 I am going to add it an see what it is doing to #12537.

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


More information about the ghc-tickets mailing list