]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
4 years agohtl: Avoid a local plt for pthread_self
Samuel Thibault [Mon, 10 Feb 2020 12:22:31 +0000 (13:22 +0100)] 
htl: Avoid a local plt for pthread_self

4 years agopthread: Move some join tests from nptl to sysdeps/pthread
Samuel Thibault [Mon, 10 Feb 2020 01:21:46 +0000 (01:21 +0000)] 
pthread: Move some join tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: Make joining self return EDEADLK
Samuel Thibault [Mon, 10 Feb 2020 01:19:00 +0000 (01:19 +0000)] 
htl: Make joining self return EDEADLK

4 years agopthread: Move most barrier tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 23:14:35 +0000 (23:14 +0000)] 
pthread: Move most barrier tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: Fix barrier_wait with one thread
Samuel Thibault [Sun, 9 Feb 2020 23:02:13 +0000 (23:02 +0000)] 
htl: Fix barrier_wait with one thread

4 years agopthread: Move most sem tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 22:55:12 +0000 (22:55 +0000)] 
pthread: Move most sem tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: Make sem_wait/sem_timedwait interruptible
Samuel Thibault [Mon, 10 Feb 2020 00:52:50 +0000 (00:52 +0000)] 
htl: Make sem_wait/sem_timedwait interruptible

4 years agohtl: Make sem_open return ENOSYS
Samuel Thibault [Sun, 9 Feb 2020 22:52:32 +0000 (22:52 +0000)] 
htl: Make sem_open return ENOSYS

instead of EOPNOTSUPP, which is for sockets.

4 years agohtl: Add support for semaphore maximum value
Samuel Thibault [Sun, 9 Feb 2020 22:44:08 +0000 (22:44 +0000)] 
htl: Add support for semaphore maximum value

4 years agopthread: Move key tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 22:27:09 +0000 (22:27 +0000)] 
pthread: Move key tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohurd: Make nanosleep a cancellation point
Samuel Thibault [Sun, 9 Feb 2020 22:27:56 +0000 (22:27 +0000)] 
hurd: Make nanosleep a cancellation point

4 years agohtl: Add support for libc cancellation points
Samuel Thibault [Sun, 9 Feb 2020 22:23:52 +0000 (22:23 +0000)] 
htl: Add support for libc cancellation points

4 years agohtl: clean __pthread_get_cleanup_stack hidden proto
Samuel Thibault [Sun, 9 Feb 2020 23:13:24 +0000 (23:13 +0000)] 
htl: clean __pthread_get_cleanup_stack hidden proto

4 years agohtl: XFAIL rwlock tests which need pshared support
Samuel Thibault [Sun, 9 Feb 2020 22:27:38 +0000 (22:27 +0000)] 
htl: XFAIL rwlock tests which need pshared support

4 years agopthread: Move some rwlock tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 20:07:51 +0000 (20:07 +0000)] 
pthread: Move some rwlock tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agopthread: Move most once tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 19:50:21 +0000 (19:50 +0000)] 
pthread: Move most once tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: support cancellation during pthread_once
Samuel Thibault [Sun, 9 Feb 2020 19:43:43 +0000 (19:43 +0000)] 
htl: support cancellation during pthread_once

4 years agopthread: Move most cond tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 19:17:51 +0000 (19:17 +0000)] 
pthread: Move most cond tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: make pthread_cond_destroy return EBUSY on waiters
Samuel Thibault [Sun, 9 Feb 2020 19:19:25 +0000 (19:19 +0000)] 
htl: make pthread_cond_destroy return EBUSY on waiters

4 years agohtl: Report missing mutex lock on pthread_cond_*wait
Samuel Thibault [Sun, 9 Feb 2020 18:12:39 +0000 (18:12 +0000)] 
htl: Report missing mutex lock on pthread_cond_*wait

4 years agohtl: Fix linking static testcases
Samuel Thibault [Sun, 9 Feb 2020 17:57:27 +0000 (17:57 +0000)] 
htl: Fix linking static testcases

They need libpthread.a

4 years agohtl: Move __register_atfork from forward to own file
Samuel Thibault [Sun, 9 Feb 2020 17:55:37 +0000 (17:55 +0000)] 
htl: Move __register_atfork from forward to own file

Since we need it also in the static linking case.

4 years agopthread: Move some attr tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 17:30:30 +0000 (17:30 +0000)] 
pthread: Move some attr tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: Fix default guard size
Samuel Thibault [Sun, 9 Feb 2020 17:27:38 +0000 (17:27 +0000)] 
htl: Fix default guard size

When it is not hardcoded by the architecture with PAGESIZE, we need to
use the dynamic values from __vm_page_size.

4 years agopthread: Move most mutex tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 17:15:47 +0000 (17:15 +0000)] 
pthread: Move most mutex tests from nptl to sysdeps/pthread

So they can be checked with htl too.

XFAIL tst-mutex4, for which support is still missing in htl.

4 years agopthread: Move spin tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 17:00:39 +0000 (17:00 +0000)] 
pthread: Move spin tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: make pthread_spin_lock really spin
Samuel Thibault [Sun, 9 Feb 2020 16:54:58 +0000 (16:54 +0000)] 
htl: make pthread_spin_lock really spin

__spin_lock would actually use gsync_wait to block, which is not what
pthread_spin_lock is about.

4 years agohtl: Avoid check-installed-headers looking at inlines
Samuel Thibault [Sun, 9 Feb 2020 16:41:24 +0000 (16:41 +0000)] 
htl: Avoid check-installed-headers looking at inlines

4 years agohtl: Do not put spin_lock inlines in public headers
Samuel Thibault [Sun, 9 Feb 2020 16:34:26 +0000 (16:34 +0000)] 
htl: Do not put spin_lock inlines in public headers

They were not getting used anyway.
Also do not make libsupport use them, it would make tests using it have
to be made to link against libmachuser for gsync_wait.

4 years agopthread: Move basic tests from nptl to sysdeps/pthread
Samuel Thibault [Sun, 9 Feb 2020 16:12:35 +0000 (16:12 +0000)] 
pthread: Move basic tests from nptl to sysdeps/pthread

So they can be checked with htl too.

4 years agohtl: Fix calling pthread_exit in the child of a fork
Samuel Thibault [Sun, 9 Feb 2020 16:01:06 +0000 (17:01 +0100)] 
htl: Fix calling pthread_exit in the child of a fork

We need to reset the threads counter, otherwise pthread_exit() would not
call exit(0).

4 years agox86: Remove <bits/select.h> and use the generic version
Florian Weimer [Sun, 9 Feb 2020 10:01:39 +0000 (11:01 +0100)] 
x86: Remove <bits/select.h> and use the generic version

Particularly on CPUs without ERMS, the string instructions are slow,
so it is unclear whether this architecture-specific implementation is
in fact an optimization.

4 years agoC11 threads: Move implementation to sysdeps/pthread
Samuel Thibault [Mon, 13 Jan 2020 19:58:28 +0000 (19:58 +0000)] 
C11 threads: Move implementation to sysdeps/pthread

so it gets shared by nptl and htl. Also add htl versions of thrd_current and
thrd_yield.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agohtl: Add C11 threads types definitions
Samuel Thibault [Mon, 13 Jan 2020 21:19:24 +0000 (21:19 +0000)] 
htl: Add C11 threads types definitions

4 years agoC11 threads: make thrd_join more portable
Samuel Thibault [Mon, 13 Jan 2020 21:52:13 +0000 (21:52 +0000)] 
C11 threads: make thrd_join more portable

by making a __pthread_join call instead of an equivalent __pthread_clockjoin_ex
call.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoC11 threads: Fix thrd_t / pthread_t compatibility assertion
Samuel Thibault [Mon, 13 Jan 2020 21:33:11 +0000 (21:33 +0000)] 
C11 threads: Fix thrd_t / pthread_t compatibility assertion

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoC11 threads: do not require PTHREAD_DESTRUCTOR_ITERATIONS
Samuel Thibault [Mon, 13 Jan 2020 21:29:21 +0000 (21:29 +0000)] 
C11 threads: do not require PTHREAD_DESTRUCTOR_ITERATIONS

It is optional in POSIX.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agonptl: Move nptl-specific types to separate header
Samuel Thibault [Mon, 13 Jan 2020 21:15:46 +0000 (21:15 +0000)] 
nptl: Move nptl-specific types to separate header

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agohtl: Make __PTHREAD_ONCE_INIT more flexible
Samuel Thibault [Mon, 13 Jan 2020 21:17:44 +0000 (21:17 +0000)] 
htl: Make __PTHREAD_ONCE_INIT more flexible

by moving its (struct __pthread_once) cast into PTHREAD_ONCE_INIT.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agohtl: Add support for C11 threads behavior
Samuel Thibault [Mon, 13 Jan 2020 20:05:08 +0000 (20:05 +0000)] 
htl: Add support for C11 threads behavior

Essentially properly calling the thread function which returns an int
instead of a void*.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agohtl: Add missing internal functions declarations
Samuel Thibault [Mon, 13 Jan 2020 20:04:44 +0000 (20:04 +0000)] 
htl: Add missing internal functions declarations

4 years agohtl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy
Samuel Thibault [Mon, 13 Jan 2020 19:46:25 +0000 (19:46 +0000)] 
htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy

4 years agohtl: Move internal mutex/rwlock symbols to GLIBC_PRIVATE
Samuel Thibault [Sat, 8 Feb 2020 23:49:53 +0000 (00:49 +0100)] 
htl: Move internal mutex/rwlock symbols to GLIBC_PRIVATE

Their prototypes have never been made public, and they are not used outside
libc (checked on the whole Debian archive)

4 years agoLinux: Add io/tst-o_path-locks test
Florian Weimer [Sun, 9 Feb 2020 10:51:08 +0000 (11:51 +0100)] 
Linux: Add io/tst-o_path-locks test

The O_PATH-based fchmodat emulation will rely on the fact that closing
an O_PATH descriptor never releases POSIX advisory locks, so this
commit adds a test case for this behavior.

4 years agosupport: Add the xlstat function
Florian Weimer [Sun, 9 Feb 2020 10:50:44 +0000 (11:50 +0100)] 
support: Add the xlstat function

4 years agohtl: Remove duplicate files
Samuel Thibault [Sun, 9 Feb 2020 00:17:24 +0000 (01:17 +0100)] 
htl: Remove duplicate files

The generic versions have the same content.

4 years agohtl: Remove unused files
Samuel Thibault [Sun, 9 Feb 2020 00:13:56 +0000 (01:13 +0100)] 
htl: Remove unused files

These have never been used.

4 years agoresolv: Fix CNAME chaining in resolv/tst-resolv-ai_idn-common.c
Florian Weimer [Fri, 7 Feb 2020 17:48:04 +0000 (18:48 +0100)] 
resolv: Fix CNAME chaining in resolv/tst-resolv-ai_idn-common.c

The second CNAME record optionally generated by the response function
used the question name, not the redirected name from the first CNAME.
This breaks the chain and results in failures of these IDNA tests if
CNAME owner names are checked as expected (which the current
implementation does not do).

4 years agoRemove a comment claiming that sin/cos round correctly.
Wilco Dijkstra [Fri, 7 Feb 2020 17:15:37 +0000 (17:15 +0000)] 
Remove a comment claiming that sin/cos round correctly.

4 years agoy2038: linux: Provide __settimeofday64 implementation
Lukasz Majewski [Thu, 16 Jan 2020 22:14:27 +0000 (23:14 +0100)] 
y2038: linux: Provide __settimeofday64 implementation

This patch provides new __settimeofday64 explicit 64 bit function for setting
64 bit time in the kernel (by internally calling __clock_settime64).
Moreover, a 32 bit version - __settimeofday has been refactored to internally
use __settimeofday64.

The __settimeofday is now supposed to be used on systems still supporting 32
bit time (__TIMESIZE != 64) - hence the necessary conversion of struct
timeval to 64 bit struct __timespec64.

Internally the settimeofday uses __settimeofday64. This patch is necessary
for having architectures with __WORDSIZE == 32 Y2038 safe.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
  https://github.com/lmajewski/meta-y2038 and run tests:
  https://github.com/lmajewski/y2038-tests/commits/master

Above tests were performed with Y2038 redirection applied as well as without
to test proper usage of both __settimeofday64 and __settimeofday.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoy2038: Provide conversion helpers for struct __timeval64
Lukasz Majewski [Thu, 16 Jan 2020 22:44:59 +0000 (23:44 +0100)] 
y2038: Provide conversion helpers for struct __timeval64

Those functions allow easy conversion between Y2038 safe, glibc internal
struct __timeval64 and other time related data structures (like struct timeval
or struct __timespec64).

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoy2038: alpha: Rename valid_timeval64_to_timeval to valid_timeval_to_timeval32
Lukasz Majewski [Tue, 28 Jan 2020 13:26:40 +0000 (14:26 +0100)] 
y2038: alpha: Rename valid_timeval64_to_timeval to valid_timeval_to_timeval32

The name 'valid_timeval64_to_timeval' suggest conversion of struct
__timeval64 to struct timeval (as in ./include/time.h).

As on the alpha the struct timeval supports 64 bit time, it seems more
feasible to emphasis struct timeval32 in the conversion function name.

Hence the helper function naming change to 'valid_timeval_to_timeval32'.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoy2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval
Lukasz Majewski [Fri, 17 Jan 2020 14:29:56 +0000 (15:29 +0100)] 
y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval

Without this patch the naming convention for functions to convert
struct timeval32 to struct timeval (which supports 64 bit time on Alpha) was
a bit misleading. The name 'valid_timeval_to_timeval64' suggest conversion
of struct timeval to struct __timeval64 (as in ./include/time.h).

As on alpha the struct timeval supports 64 bit time it seems more readable
to emphasis struct timeval32 in the conversion function name.

Hence the helper function naming change to 'valid_timeval32_to_timeval'.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoy2038: Introduce struct __timeval64 - new internal glibc type
Lukasz Majewski [Thu, 16 Jan 2020 22:40:51 +0000 (23:40 +0100)] 
y2038: Introduce struct __timeval64 - new internal glibc type

This type is a glibc's "internal" type similar to struct timeval but
whose tv_sec field is a __time64_t rather than a time_t, which makes it
Y2038-proof. This struct is NOT supposed to be passed to the kernel -
instead it shall be converted to struct __timespec64 and clock_[sg]ettime
syscalls shall be used (which are now Y2038 safe).

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoy2038: Define __suseconds64_t type to be used with struct __timeval64
Lukasz Majewski [Sat, 25 Jan 2020 21:33:41 +0000 (22:33 +0100)] 
y2038: Define __suseconds64_t type to be used with struct __timeval64

The __suseconds64_t type is supposed to be the 64 bit type across all
architectures.

It would be mostly used internally in the glibc - however, when passed to
Linux kernel (very unlikely), if necessary, it shall be converted to 32
bit type (i.e. __suseconds_t)

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoUpdate kernel version to 5.5 in tst-mman-consts.py.
Joseph Myers [Fri, 7 Feb 2020 13:55:29 +0000 (13:55 +0000)] 
Update kernel version to 5.5 in tst-mman-consts.py.

This patch updates the kernel version in the test tst-mman-consts.py
to 5.5.  (There are no new constants covered by this test in 5.5 that
need any other header changes.)

Tested with build-many-glibcs.py.

4 years agoUpdate syscall lists for Linux 5.5.
Joseph Myers [Fri, 7 Feb 2020 13:54:58 +0000 (13:54 +0000)] 
Update syscall lists for Linux 5.5.

Linux 5.5 has no new syscalls to add to syscall-names.list, but it
does newly enable the clone3 syscall for AArch64.  This patch updates
the kernel version listed in syscall-names.list and regenerates the
AArch64 arch-syscall.h.

Tested with build-many-glibcs.py.

4 years agoNEWS: Set fill-column hint to 72
Siddhesh Poyarekar [Fri, 7 Feb 2020 02:27:04 +0000 (07:57 +0530)] 
NEWS: Set fill-column hint to 72

Match up with list-fixed-bugs.py and also with the fact that many
email clients default to 72 chars when composing emails.

Reviewed-by: Joseph Myers <joseph@codesourcery.com>
4 years agoy2038: linux: Provide __timespec_get64 implementation
Lukasz Majewski [Wed, 15 Jan 2020 09:14:23 +0000 (10:14 +0100)] 
y2038: linux: Provide __timespec_get64 implementation

This patch provides new instance of Linux specific timespec_get.c file placed
in ./sysdeps/unix/sysv/linux/.

When compared to this file version from ./time directory, it provides
__timespec_get64 explicit 64 bit function for getting 64 bit time in the
struct __timespec64 (for compilation using C11 standard).
Moreover, a 32 bit version - __timespec_get internally uses
__timespec_get64.

The __timespec_get is now supposed to be used on systems still supporting 32
bit time (__TIMESIZE != 64) - hence the necessary conversion to 32 bit struct
timespec.

Internally the timespec_get uses __clock_gettime64. This patch is necessary
for having architectures with __WORDSIZE == 32 Y2038 safe.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
  https://github.com/lmajewski/meta-y2038 and run tests:
  https://github.com/lmajewski/y2038-tests/commits/master

Above tests were performed with Y2038 redirection applied as well as without
to test proper usage of both __timespec_get64 and __timespec_get.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoUse binutils 2.34 branch in build-many-glibcs.py.
Joseph Myers [Mon, 3 Feb 2020 20:38:27 +0000 (20:38 +0000)] 
Use binutils 2.34 branch in build-many-glibcs.py.

This patch makes build-many-glibcs.py use binutils 2.34 branch.

Tested with build-many-glibcs.py (compilers and glibcs builds).

4 years agoRun nptl/tst-pthread-getattr in a container
DJ Delorie [Mon, 3 Feb 2020 19:57:23 +0000 (14:57 -0500)] 
Run nptl/tst-pthread-getattr in a container

See https://bugzilla.redhat.com/show_bug.cgi?id=1653942

This test depends on the kernel's assignment of memory regions, but
running under ld.so explicitly changes those assignments, sometimes
sufficiently to cause the test to fail (esp with address space
randomization).

The easiest way to "fix" the test, is to run it the way the user would
- without ld.so.  Running it in a container does that.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
4 years agotest-container: add exec, cwd
DJ Delorie [Mon, 3 Feb 2020 19:49:25 +0000 (14:49 -0500)] 
test-container: add exec, cwd

exec <path_to_test_binary> [optional_argv_0]

  copies test binary to specified location and runs it from
  there.  If the second argument is provided, that will
  be used for argv[0]

cwd <directory>

  attempts to chdir(directory) before running test

Note: "cwd" not "cd" as it takes effect just before the
test binary runs, not when it's encountered in the script,
so it can't be used as a path shortcut like "cd" would imply.

cleanup: use xstrdup() instead of strdup()

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
4 years agoUse Linux 5.5 in build-many-glibcs.py.
Joseph Myers [Mon, 3 Feb 2020 14:17:05 +0000 (14:17 +0000)] 
Use Linux 5.5 in build-many-glibcs.py.

This patch makes build-many-glibcs.py use Linux 5.5.

Tested with build-many-glibcs.py (compilers and glibcs builds).

4 years agort: avoid PLT setup in timer_[sg]ettime
Andreas Schwab [Mon, 27 Jan 2020 09:05:53 +0000 (10:05 +0100)] 
rt: avoid PLT setup in timer_[sg]ettime

The functions __timer_gettime64 and __timer_settime64 live in librt, not
libc.  Use proper hidden aliases so that the callers do not need to set up
the PLT register.

Fixes commits cae1635a70 ("y2038: linux: Provide __timer_settime64
implementation") and 562cdc19c7 ("y2038: linux: Provide __timer_gettime64
implementation").

4 years agoUpdate or_IN collation [BZ #22525]
Mike FABIAN [Thu, 5 Dec 2019 13:21:21 +0000 (14:21 +0100)] 
Update or_IN collation [BZ #22525]

- Add a test file or_IN.UTF-8.in.
- Make the collation agree with CLDR.

4 years agoFix ckb_IQ [BZ #9809]
Mike FABIAN [Mon, 13 Jan 2020 09:12:07 +0000 (10:12 +0100)] 
Fix ckb_IQ [BZ #9809]

Add ckb_IQ to SUPPORTED file.
Add ckb_IQ.UTF-8.in collation test file.
Mention new ckb_IQ locale in NEWS.

4 years agoAdd new locale: ckb_IQ (Kurdish/Sorani spoken in Iraq) [BZ #9809]
Jwtiyar Nariman [Mon, 13 Jan 2020 09:06:06 +0000 (10:06 +0100)] 
Add new locale: ckb_IQ (Kurdish/Sorani spoken in Iraq) [BZ #9809]

4 years agolist-fixed-bugs.py: Wrap at 72 chars
Siddhesh Poyarekar [Sat, 1 Feb 2020 13:49:02 +0000 (19:19 +0530)] 
list-fixed-bugs.py: Wrap at 72 chars

Wrap the bug list output at 72 chars to make it easy to paste into
emails.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
4 years agoy2038: linux: Provide __sched_rr_get_interval64 implementation
Lukasz Majewski [Mon, 6 Jan 2020 12:52:00 +0000 (13:52 +0100)] 
y2038: linux: Provide __sched_rr_get_interval64 implementation

This patch replaces auto generated wrapper (as described in
sysdeps/unix/sysv/linux/syscalls.list) for sched_rr_get_interval with one which
adds extra support for reading 64 bit time values on machines with
__TIMESIZE != 64.
There is no functional change for architectures already supporting 64 bit
time ABI.

The sched_rr_get_interval declaration in ./include/sched.h is not followed by
corresponding libc_hidden_proto(), so it has been assumed that newly introduced
syscall wrapper doesn't require libc_hidden_def() (which has been added by
template used with auto generation script).

Moreover, the code for building sched_rr_gi.c file is already placed in
./posix/Makefiles, so there was no need to add it elsewhere.

Performed tests and validation are the same as for timer_gettime() conversion
(sysdeps/unix/sysv/linux/timer_gettime.c).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoy2038: linux: Provide __timerfd_settime64 implementation
Lukasz Majewski [Fri, 6 Dec 2019 15:20:33 +0000 (16:20 +0100)] 
y2038: linux: Provide __timerfd_settime64 implementation

This patch replaces auto generated wrapper (as described in
sysdeps/unix/sysv/linux/syscalls.list) for timerfd_settime with one which
adds extra support for reading and writing from Linux kernel 64 bit time
values on machines with __TIMESIZE != 64.
There is no functional change for archs already supporting 64 bit time ABI.

This patch is conceptually identical to timer_settime conversion already
done in sysdeps/unix/sysv/linux/timer_settime.c.
Please refer to corresponding commit message for detailed description of
introduced functions and the testing procedure.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
---
Changes for v4:
- Update date from 2019 to 2020

Changes for v3:
- Add missing libc_hidden_def()

Changes for v2:
- Remove "Contributed by" from the file header
- Remove early check for (fd < 0) in __timerfd_settime64 as the fd
  correctness check is already done in Linux kernel
- Add single descriptive comment line to provide concise explanation
  of the code

4 years agoy2038: linux: Provide __timerfd_gettime64 implementation
Lukasz Majewski [Fri, 6 Dec 2019 09:41:50 +0000 (10:41 +0100)] 
y2038: linux: Provide __timerfd_gettime64 implementation

This patch replaces auto generated wrapper (as described in
sysdeps/unix/sysv/linux/syscalls.list) for timerfd_gettime with one which
adds extra support for reading 64 bit time values on machines with
__TIMESIZE != 64.
There is no functional change for architectures already supporting 64 bit
time ABI.

This patch is conceptually identical to timer_gettime conversion already
done in sysdeps/unix/sysv/linux/timer_gettime.c.
Please refer to corresponding commit message for detailed description of
introduced functions and the testing procedure.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
---
Changes for v4:
- Update date from 2019 to 2020

Changes for v3:
- Add missing libc_hidden_def()

Changes for v2:
- Remove "Contributed by" from the file header
- Remove early check for (fd < 0) in __timerfd_gettime64 as the fd
  correctness check is already done in Linux kernel
- Add single descriptive comment line to provide concise explanation
  of the code

4 years agoi386: Remove _exit.S
H.J. Lu [Sat, 1 Feb 2020 13:44:56 +0000 (05:44 -0800)] 
i386: Remove _exit.S

The generic implementation is suffice since __NR_exit_group is always
support and i386 does define ABORT_INSTRUCTION.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoi386: Use ENTRY/END in assembly codes
H.J. Lu [Sat, 1 Feb 2020 13:44:55 +0000 (05:44 -0800)] 
i386: Use ENTRY/END in assembly codes

Use ENTRY and END in assembly codes so that ENDBR32 will be added at
function entries when CET is enabled.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoi386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__
H.J. Lu [Sat, 1 Feb 2020 13:44:55 +0000 (05:44 -0800)] 
i386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__

Since _mcount and __fentry__ don't use ENTRY, we need to add _CET_ENDBR
by hand.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoi386/sub_n.S: Add a missing _CET_ENDBR to indirect jump target
H.J. Lu [Sat, 1 Feb 2020 13:44:55 +0000 (05:44 -0800)] 
i386/sub_n.S: Add a missing _CET_ENDBR to indirect jump target

Add a missing _CET_ENDBR to indirect jump targe in sysdeps/i386/sub_n.S.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agoi386: Don't unnecessarily save and restore EAX, ECX and EDX [BZ# 25262]
H.J. Lu [Sat, 1 Feb 2020 13:44:55 +0000 (05:44 -0800)] 
i386: Don't unnecessarily save and restore EAX, ECX and EDX [BZ# 25262]

On i386, since EAX, ECX and EDX are caller-saved, there are no need
to save and restore EAX, ECX and EDX in getcontext, setcontext and
swapcontext.  They just need to clear EAX on success.  The extra
scratch registers are needed to enable CET.

Tested on i386.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
4 years agox86: Don't make 2 calls to dlerror () in a row
H.J. Lu [Sat, 1 Feb 2020 13:43:34 +0000 (05:43 -0800)] 
x86: Don't make 2 calls to dlerror () in a row

We shouldn't make 2 calls to dlerror () in a row since the first call
will clear the error.  We should just use the return value from the
first call.

Tested on Linux/x86-64.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
4 years agoOpen master for 2.32 development glibc-2.31.9000
Siddhesh Poyarekar [Sat, 1 Feb 2020 11:38:55 +0000 (17:08 +0530)] 
Open master for 2.32 development

happy hacking!

4 years agoGenerate ChangeLog.old/ChangeLog.20 for 2.31 glibc-2.31
Siddhesh Poyarekar [Sat, 1 Feb 2020 10:56:33 +0000 (16:26 +0530)] 
Generate ChangeLog.old/ChangeLog.20 for 2.31

We're ready to tag!

4 years agoUpdate version numbers for 2.31 release
Siddhesh Poyarekar [Sat, 1 Feb 2020 10:52:59 +0000 (16:22 +0530)] 
Update version numbers for 2.31 release

4 years agoAdd bugs fixed in 2.31 in NEWS
Siddhesh Poyarekar [Sat, 1 Feb 2020 10:46:55 +0000 (16:16 +0530)] 
Add bugs fixed in 2.31 in NEWS

4 years agoUpdate newest tested versions of dependencies in install.texi
Siddhesh Poyarekar [Sat, 1 Feb 2020 10:44:37 +0000 (16:14 +0530)] 
Update newest tested versions of dependencies in install.texi

Updated versions of gcc, binutils, awk, bison and perl.

4 years agoAdd more contributors to the manual
Siddhesh Poyarekar [Sat, 1 Feb 2020 09:56:44 +0000 (15:26 +0530)] 
Add more contributors to the manual

4 years agoAdd note to NEWS about kernel headers dependency on risc-v
Siddhesh Poyarekar [Sat, 1 Feb 2020 09:21:50 +0000 (14:51 +0530)] 
Add note to NEWS about kernel headers dependency on risc-v

It was discovered that RISC-V 64-bit still needs kernel headers >= 5.0
to be installed to build correctly:

https://gitlab.com/kubu93/toolchains-builder/-/jobs/422726962

Fix up the NEWS item to make that clear.

4 years agoAdd Portuguese (Portugal) translation
Siddhesh Poyarekar [Sat, 1 Feb 2020 11:45:38 +0000 (17:15 +0530)] 
Add Portuguese (Portugal) translation

4 years agoAdd NEWS entry about 64-bit time_t syscall use on 32-bit targets
Szabolcs Nagy [Thu, 30 Jan 2020 10:40:01 +0000 (10:40 +0000)] 
Add NEWS entry about 64-bit time_t syscall use on 32-bit targets

This internal change ideally should not affect the public API or ABI,
but there is a widespread use of seccomp sandboxes, even on 32-bit
targets, that don't handle new Linux syscall usage well, so it's
worth mentioning in the NEWS.

Co-authored-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
4 years agonptl: Avoid using PTHREAD_MUTEX_DEFAULT in macro definition [BZ #25271]
Florian Weimer [Thu, 30 Jan 2020 14:54:49 +0000 (15:54 +0100)] 
nptl: Avoid using PTHREAD_MUTEX_DEFAULT in macro definition [BZ #25271]

Commit 1c3f9acf1f1f75faa7a28bf39af64afd ("nptl: Add struct_mutex.h")
replaced a zero constant with the identifier PTHREAD_MUTEX_DEFAULT
in the macro PTHREAD_MUTEX_INITIALIZER.  However, that constant
is not available in ISO C11 mode:

In file included from /usr/include/bits/thread-shared-types.h:74,
                 from /usr/include/bits/pthreadtypes.h:23,
                 from /usr/include/pthread.h:26,
                 from bug25271.c:1:
bug25271.c:3:21: error: ‘PTHREAD_MUTEX_DEFAULT’ undeclared here (not in a function)
    3 | pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~

This commit change the constant to the equivalent
PTHREAD_MUTEX_TIMED_NP, which is in the POSIX extension namespace
and thus always available.

4 years agoBuild raise with -fasynchronous-unwind-tables.
Joseph Myers [Fri, 24 Jan 2020 17:23:47 +0000 (17:23 +0000)] 
Build raise with -fasynchronous-unwind-tables.

In testing glibc for Arm and MIPS, I see:

FAIL: misc/tst-sigcontext-get_pc

If this test - backtracing through a call to raise - is valid, then
raise needs to be built with -fasynchronous-unwind-tables (as the test
itself is) to have the required unwind information for that
backtracing to work.  Adding that option, which this patch does,
causes the test for pass for Arm.  For MIPS, the test still does not
pass (the backtrace has an address that is 2 bytes after the "address
in signal handler", for unknown reasons), although the patch allows a
longer backtrace to be produced.

4 years agoFix locale/tst-locale-locpath cross-testing when sshd sets LANG.
Joseph Myers [Fri, 24 Jan 2020 17:23:07 +0000 (17:23 +0000)] 
Fix locale/tst-locale-locpath cross-testing when sshd sets LANG.

The locale/tst-locale-locpath test unsets LANG, then runs a test with
test_wrapper_env and expects LANG to remain unset for that test.  This
does not work for cross-testing with cross-test-ssh.sh when sshd (on
the system specified as an argument to cross-test-ssh.sh) is
configured to have a default LANG setting.

The general design used in cross testing, after commit
8540f6d2a74fe9d67440535ebbcfa252180a3172 ("Don't require test wrappers
to preserve environment variables, use more consistent environment.",
6 June 2014), is that environment settings required by tests should be
passed explicitly to $(test-wrapper-env).  This patch changes
tst-locale-locpath.sh to pass an explicit LANG= rather than expecting
"unset LANG" to be in effect for the program run under
test_wrapper_env.  Note that this does slightly change the environment
in which the test is run natively (empty LANG instead of unset LANG)
but that difference does not appear relevant to what it is trying to
test.

Tested for Arm that this fixes the failure seen for that test in
cross-testing.

4 years agoFix elf/tst-rtld-preload cross-testing.
Joseph Myers [Fri, 24 Jan 2020 17:22:13 +0000 (17:22 +0000)] 
Fix elf/tst-rtld-preload cross-testing.

As noted in
<https://sourceware.org/ml/libc-alpha/2019-06/msg00824.html>,
elf/tst-rtld-preload fails when cross-testing because it attempts to
run the test wrapper with itself.  Unfortunately, that thread never
resulted in a complete and correct patch for that test.

This patch addresses the issues with that test more thoroughly.  The
test is changed not to use the wrapper twice, including updating the
message it prints about the command it runs to be more complete and
accurate after the change; the Makefile is changed not to pass the
redundant '$(test-wrapper)' argument.

Tested for Arm that this fixes the failure seen for that test in
cross-testing.

4 years agoFix cross-testing of tst-ifunc-fault-* tests.
Joseph Myers [Thu, 23 Jan 2020 14:34:16 +0000 (14:34 +0000)] 
Fix cross-testing of tst-ifunc-fault-* tests.

The tests elf/tst-ifunc-fault-bindnow and elf/tst-ifunc-fault-lazy
fail in cross-testing because they run the dynamic linker directly
without using the test wrapper.  This patch fixes them to use the test
wrapper instead.

Tested that this fixes the failure of those two tests for powerpc
soft-float.

4 years agogitlog-to-changelog: Drop scripts in favour of gnulib version
Siddhesh Poyarekar [Fri, 17 Jan 2020 03:41:49 +0000 (09:11 +0530)] 
gitlog-to-changelog: Drop scripts in favour of gnulib version

The ChangeLog automation scripts were incorporated in gnulib as
vcs-to-changelog for a while now since other projects expressed the
desire to use and extend this script.  In the interest of avoiding
duplication of code, drop the glibc version of gitlog-to-changelog and
use the gnulib one directly.

The only file that remains is vcstocl_quirks.py, which specifies
properties and quirks of the glibc project source code.  This patch
also drops the shebang at the start of vcstocl_quirks.py since the
file is not intended to be directly executable.

4 years agoAdd NEWS entry about the change in handling of PT_GNU_STACK on MIPS
Dragan Mladjenovic [Wed, 22 Jan 2020 17:14:23 +0000 (17:14 +0000)] 
Add NEWS entry about the change in handling of PT_GNU_STACK on MIPS

The change was introduced in:

commit 33bc9efd91de1b14354291fc8ebd5bce96379f12
Author: Dragan Mladjenovic <dmladjenovic@wavecomp.com>
Date:   Fri Aug 23 16:38:04 2019 +0000

    mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels

and probably requires a small explanation.

Co-authored-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
4 years agoFix array overflow in backtrace on PowerPC (bug 25423)
Andreas Schwab [Mon, 20 Jan 2020 16:01:50 +0000 (17:01 +0100)] 
Fix array overflow in backtrace on PowerPC (bug 25423)

When unwinding through a signal frame the backtrace function on PowerPC
didn't check array bounds when storing the frame address.  Fixes commit
d400dcac5e ("PowerPC: fix backtrace to handle signal trampolines").

4 years agogetaddrinfo: Fix resource leak after strdup failure in gethosts [BZ #25425]
Florian Weimer [Mon, 20 Jan 2020 17:37:13 +0000 (18:37 +0100)] 
getaddrinfo: Fix resource leak after strdup failure in gethosts [BZ #25425]

Filip Ochnik spotted that one of the error jumps in gethosts fails to
call __resolv_context_put to release the resolver context.

Fixes commit 352f4ff9a268b81ef5d4b2413f582565806e4790 ("resolv:
Introduce struct resolv_context [BZ #21668]") and commit
964263bb8d650f1681665c55704fb01a8e725621 ("getaddrinfo: Release
resolver context on error in gethosts [BZ #21885]").

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
4 years agoRun bench-timing-type with newly built libc.
Joseph Myers [Mon, 20 Jan 2020 11:29:41 +0000 (11:29 +0000)] 
Run bench-timing-type with newly built libc.

benchtests/timing-type is built with the newly built libc, so should
be run with it like actual tests and benchmarks.

4 years agoGet rid of Werror=maybe-uninitialized in res_send.c.
Stefan Liebler [Mon, 20 Jan 2020 09:55:55 +0000 (10:55 +0100)] 
Get rid of Werror=maybe-uninitialized in res_send.c.

The commit 446997ff1433d33452b81dfa9e626b8dccf101a4 introduced
this new usage of resplen. If build with gcc 9 -march>=z13 on s390x,
the following warning occurs:
res_send.c: In function ‘__res_context_send’:
res_send.c:539:6: error: ‘resplen’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  539 |   if (resplen > HFIXEDSZ)
      |      ^

Therefore this patch adds a further DIAG_IGNORE_NEEDS_COMMENT in the
same way as it was previously done for usages of resplen or n.
See commit d1bc2cbbed9aea2017ef941f63c8786571da5b4f.

4 years agotranslations: Update translations
Siddhesh Poyarekar [Sun, 19 Jan 2020 05:13:26 +0000 (10:43 +0530)] 
translations: Update translations

Update translations after adding msgattrib to the update-translations
makefile target.

4 years agotranslations: Trim po files using msgattrib
Siddhesh Poyarekar [Fri, 17 Jan 2020 17:19:33 +0000 (22:49 +0530)] 
translations: Trim po files using msgattrib

The translation project coordinator Benno Schulenberg suggested that
we could save space in our tarball by trimming the generated po files
by using msgattrib and dropping all untranslated, fuzzy and obsolete
messages.  This patch updates the update-translations target to do
that.  Testing indicates that the current po files reduce by over 65K
lines due to this trimming.

4 years agoUpdate translations
Siddhesh Poyarekar [Sun, 19 Jan 2020 04:51:35 +0000 (10:21 +0530)] 
Update translations

Update translations from the translation project.