[GHC] #14244: ghc-prim: hs_atomicread* and hs_atomicwrite* missing barriers

GHC ghc-devs at haskell.org
Sat Feb 3 17:30:04 UTC 2018


#14244: ghc-prim: hs_atomicread* and hs_atomicwrite* missing barriers
-------------------------------------+-------------------------------------
        Reporter:  trommler          |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.4.1
       Component:  Prelude           |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12537            |  Differential Rev(s):  Phab:D4009
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"217e4170bdce3df28a667803ce5e619553bfecdd/ghc" 217e417/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="217e4170bdce3df28a667803ce5e619553bfecdd"
 ghc-prim: Emulate C11 atomics when not available

 GCC's __sync primitives apparently "usually" imply a full barrier,
 meaning they can be used to emulate the more precise C11 atomics albeit
 with a loss of efficiency. This restores compatibility with GCC 4.4.

 This partially reverts commit 59de290928e6903337f31c1f8107ac8a98ea145d.

 Test Plan: Validate on Centos

 Reviewers: hvr, simonmar, trommler

 Subscribers: rwbarton, thomie, erikd, carter

 GHC Trac Issues: #14244

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

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


More information about the ghc-tickets mailing list