diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-10-16 14:27:29 -0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-11-07 09:48:28 -0200 |
commit | dff91cd45e35e47d567274331f3deb8e87a188c9 (patch) | |
tree | 9a5d1d28776f771977e68bd67b0cd5b8360d05df /ChangeLog | |
parent | b7fc95f8c8afab296f0e3c29d4effdc68663319c (diff) | |
download | glibc-dff91cd45e35e47d567274331f3deb8e87a188c9.tar glibc-dff91cd45e35e47d567274331f3deb8e87a188c9.tar.gz glibc-dff91cd45e35e47d567274331f3deb8e87a188c9.tar.bz2 glibc-dff91cd45e35e47d567274331f3deb8e87a188c9.zip |
nptl: Add tests for internal pthread_mutex_t offsets
This patch adds a new build test to check for internal fields
offsets for user visible internal field. Although currently
the only field which is statically initialized to a non zero value
is pthread_mutex_t.__data.__kind value, the tests also check the
offset of __kind, __spins, __elision (if supported), and __list
internal member. A internal header (pthread-offset.h) is added
to each major ABI with the reference value.
Checked on x86_64-linux-gnu and with a build check for all affected
ABIs (aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf,
hppa-linux-gnu, i686-linux-gnu, ia64-linux-gnu, m68k-linux-gnu,
microblaze-linux-gnu, mips64-linux-gnu, mips64-n32-linux-gnu,
mips-linux-gnu, powerpc64le-linux-gnu, powerpc-linux-gnu,
s390-linux-gnu, s390x-linux-gnu, sh4-linux-gnu, sparc64-linux-gnu,
sparcv9-linux-gnu, tilegx-linux-gnu, tilegx-linux-gnu-x32,
tilepro-linux-gnu, x86_64-linux-gnu, and x86_64-linux-x32).
* nptl/pthreadP.h (ASSERT_PTHREAD_STRING,
ASSERT_PTHREAD_INTERNAL_OFFSET): New macro.
* nptl/pthread_mutex_init.c (__pthread_mutex_init): Add build time
checks for internal pthread_mutex_t offsets.
* sysdeps/aarch64/nptl/pthread-offsets.h
(__PTHREAD_MUTEX_NUSERS_OFFSET, __PTHREAD_MUTEX_KIND_OFFSET,
__PTHREAD_MUTEX_SPINS_OFFSET, __PTHREAD_MUTEX_ELISION_OFFSET,
__PTHREAD_MUTEX_LIST_OFFSET): New macro.
* sysdeps/alpha/nptl/pthread-offsets.h: Likewise.
* sysdeps/arm/nptl/pthread-offsets.h: Likewise.
* sysdeps/hppa/nptl/pthread-offsets.h: Likewise.
* sysdeps/i386/nptl/pthread-offsets.h: Likewise.
* sysdeps/ia64/nptl/pthread-offsets.h: Likewise.
* sysdeps/m68k/nptl/pthread-offsets.h: Likewise.
* sysdeps/microblaze/nptl/pthread-offsets.h: Likewise.
* sysdeps/mips/nptl/pthread-offsets.h: Likewise.
* sysdeps/nios2/nptl/pthread-offsets.h: Likewise.
* sysdeps/powerpc/nptl/pthread-offsets.h: Likewise.
* sysdeps/s390/nptl/pthread-offsets.h: Likewise.
* sysdeps/sh/nptl/pthread-offsets.h: Likewise.
* sysdeps/sparc/nptl/pthread-offsets.h: Likewise.
* sysdeps/tile/nptl/pthread-offsets.h: Likewise.
* sysdeps/x86_64/nptl/pthread-offsets.h: Likewise.
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -1,3 +1,29 @@ +2017-11-07 Adhemerval Zanella <adhemerval.zanella@linaro.org> + + * nptl/pthreadP.h (ASSERT_PTHREAD_STRING, + ASSERT_PTHREAD_INTERNAL_OFFSET): New macro. + * nptl/pthread_mutex_init.c (__pthread_mutex_init): Add build time + checks for internal pthread_mutex_t offsets. + * sysdeps/aarch64/nptl/pthread-offsets.h + (__PTHREAD_MUTEX_NUSERS_OFFSET, __PTHREAD_MUTEX_KIND_OFFSET, + __PTHREAD_MUTEX_SPINS_OFFSET, __PTHREAD_MUTEX_ELISION_OFFSET, + __PTHREAD_MUTEX_LIST_OFFSET): New macro. + * sysdeps/alpha/nptl/pthread-offsets.h: Likewise. + * sysdeps/arm/nptl/pthread-offsets.h: Likewise. + * sysdeps/hppa/nptl/pthread-offsets.h: Likewise. + * sysdeps/i386/nptl/pthread-offsets.h: Likewise. + * sysdeps/ia64/nptl/pthread-offsets.h: Likewise. + * sysdeps/m68k/nptl/pthread-offsets.h: Likewise. + * sysdeps/microblaze/nptl/pthread-offsets.h: Likewise. + * sysdeps/mips/nptl/pthread-offsets.h: Likewise. + * sysdeps/nios2/nptl/pthread-offsets.h: Likewise. + * sysdeps/powerpc/nptl/pthread-offsets.h: Likewise. + * sysdeps/s390/nptl/pthread-offsets.h: Likewise. + * sysdeps/sh/nptl/pthread-offsets.h: Likewise. + * sysdeps/sparc/nptl/pthread-offsets.h: Likewise. + * sysdeps/tile/nptl/pthread-offsets.h: Likewise. + * sysdeps/x86_64/nptl/pthread-offsets.h: Likewise. + 2017-11-07 Florian Weimer <fweimer@redhat.com> * bits/mman-linux.h: Move ... |