This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Fix the atomic_compare_and_exchange_*_rel definitions.

Hello, Tulio

Thank you and please see my comments below~

-----Original Message-----
From: Tulio Magno Quites Machado Filho [] 
Sent: Monday, June 13, 2016 10:19 PM
To: Lei Xu;
Cc: Scott Wood;;
Subject: Re: [PATCH] Fix the atomic_compare_and_exchange_*_rel definitions.

Hi Lei,

Lei Xu <> writes:

> In current code, atomic_compare_and_exchange_*_rel is defined as 
> atomic_compare_and_exchange_*_acq, however this is wrong on power 
> arch, especially __arch_*_rel has been defined on power arch.
> This has caused segmentation fault issue when doing 
> pthread_mutex_lock/unlock operations on PowerPC E6500.

I didn't expect the generic code to affect a PowerPC E6500 build.
It should be using both of the files:

These files define atomic_compare_and_exchange_val_rel(), which should prevent from defining the atomic_compare_and_exchange_val_rel() as
atomic_compare_and_exchange_val_acq() in the generic file.

[XuLei] It defines atomic_compare_and_exchange_val_rel in sysdeps/powerpc/bits/atomic.h, but not define atomic_compare_and_exchange_bool_rel.
I will paste another solution in next email and would like to get your comments, thanks.

So, there is a chance your build didn't use these files...
How are you configuring your glibc build?

Tulio Magno

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]