[PATCH 1/2] server: Always place compiler barrier before atomic memory stores.

Rémi Bernon rbernon at codeweavers.com
Thu Feb 10 12:16:43 CST 2022


On 2/10/22 19:06, Jin-oh Kang wrote:
> On Fri, Feb 11, 2022, 3:03 AM Jin-oh Kang <jinoh.kang.kr at gmail.com> wrote:
> 
>> On Fri, Feb 11, 2022, 2:50 AM Rémi Bernon <rbernon at codeweavers.com> wrote:
>>
>>> On 2/10/22 18:43, Rémi Bernon wrote:
>>>> On 2/10/22 18:36, Jin-oh Kang wrote:
>>>>>
>>>>> We still support GCC 4.x (an in-support RHEL/CentOS release uses it),
>>>>> so I
>>>>> think we still need some wrappers around it. That and the GCC bug.
>>>>>
>>>>
>>>> The __sync intrinsices seems to have be there since GCC 4.2, then
>>>> deprecated when __atomic where introduced in GCC 4.7. What's that bug?
>>>>
>>>
>>> Nvm I missed that part of the first patch.
>>>
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81316 says the bug only
>> affects the __ATOMIC_RELEASE case, but it affects __ATOMIC_SEQ_CST too on
>> ARM64: https://godbolt.org/z/aTaaYaoGK
>>
> 
> Which is to say, this is still a meaningful fix for non-x86 architectures.
> 

Yes, except that I think we still only care about then ordering between 
the volatile stores, and the bug doesn't happen if the two variables are 
volatile.

-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list