This is the mail archive of the libc-alpha@sourceware.org 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 1/3] nptl: Add tests for internal pthread_mutex_t offsets



On 20/10/2017 11:57, H.J. Lu wrote:
> On Fri, Oct 20, 2017 at 6:17 AM, Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>> On 19/10/2017 20:39, H.J. Lu wrote:
>>> On Thu, Oct 19, 2017 at 2:54 PM, Adhemerval Zanella
>>> <adhemerval.zanella@linaro.org> wrote:
>>>>
>>>>
>>>> On 19/10/2017 19:12, H.J. Lu wrote:
>>>>> On Thu, Oct 19, 2017 at 2:00 PM, Adhemerval Zanella
>>>>>> diff --git a/sysdeps/x86_64/nptl/pthread-offsets.h b/sysdeps/x86_64/nptl/pthread-offsets.h
>>>>>> new file mode 100644
>>>>>> index 0000000..16c6b0d
>>>>>> --- /dev/null
>>>>>> +++ b/sysdeps/x86_64/nptl/pthread-offsets.h
>>>>>> @@ -0,0 +1,5 @@
>>>>>> +#define __PTHREAD_MUTEX_NUSERS_OFFSET   12
>>>>>> +#define __PTHREAD_MUTEX_KIND_OFFSET     16
>>>>>> +#define __PTHREAD_MUTEX_SPINS_OFFSET    20
>>>>>> +#define __PTHREAD_MUTEX_ELISION_OFFSET  22
>>>>>> +#define __PTHREAD_MUTEX_LIST_OFFSET     24
>>>>>> --
>>>>>
>>>>> These are wrong for x32.  You need to add
>>>>>
>>>>> #if __WORDSIZE == 64
>>>>> ...
>>>>
>>>> Right, I used the values which are the one expected to avoid
>>>> ABI breakage.  This indeed will break x32 tests build, but the
>>>> idea is to have at 1/3 and 3/3 patch pushed together (which
>>>> I should have made explicit in patch submission).
>>>
>>> No.  1/3 should be backported to 2.26/2.25 branches unchanged.
>>
>> So your suggestion is to have __WORDSIZE == 64 with the wrong
>> values and get them right on the subsequent patch?
> 
> The 1/3 patch should have the CORRECT offsets for x32, which
> should pass on 2.25 branch and fail on 2.26/2.27 until the 3/3 patch
> is applied.

I am not following then because I cherry pick the patch on 2.25 branch
it is works as is for x32.  And it also fails as expected on 2.26 with
make nptl/tests.


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