Re: TSan error with boost::interprocess::message_queue on macOS ARM

Ion Gaztañaga via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <[email protected]>
On 07/09/2022 20:33, Jens Carl via Boost-users wrote:
> 
> 
> On 8/23/22 08:37, Ion Gaztañaga via Boost-users wrote:
>>> I looked at code of atomic_cas32() and it uses the legacy built-in 
>>> __sync_val_compare_and_swap().
>>> Can it be that that built-in isn't supported on ARM?
>>> Is there a newer built-in which should be used?
>>
>> It could be. Can you test if __atomic_compare_exchange avoids the TSAN 
>> error?
>>
>> inline boost::uint32_t atomic_cas32
>>     ( volatile boost::uint32_t *mem
>>     , boost::uint32_t with, boost::uint32_t cmp)
>> {
>>     __atomic_compare_exchange
>>       (const_cast<boost::uint32_t*>(mem), &cmp, &with, false
>>       ,__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
>>     return cmp;
>> }
>>
> 
> I changed the code as you suggested, but I still get the same error.
> 
> Cheers,
>   Jens

Sorry to hear that. I'm afraid I've run out of ideas :-(

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.