]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
3 years agoAdd PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.
Joseph Myers [Tue, 24 Apr 2018 12:11:35 +0000 (12:11 +0000)] 
Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.

This patch adds the PTRACE_SECCOMP_GET_METADATA constant from Linux
4.16 to all relevant sys/ptrace.h files.  A type struct
__ptrace_seccomp_metadata, analogous to other such types, is also
added.

Tested for x86_64, and with build-many-glibcs.py.

* sysdeps/unix/sysv/linux/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): New enum value and macro.
* sysdeps/unix/sysv/linux/bits/ptrace-shared.h
(struct __ptrace_seccomp_metadata): New type.
* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/arm/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/s390/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/tile/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.
* sysdeps/unix/sysv/linux/x86/sys/ptrace.h
(PTRACE_SECCOMP_GET_METADATA): Likewise.

(cherry picked from commit 9320ca88a197d3620d3553ccc2d9402d981d7e23)

3 years agoresolv: Fully initialize struct mmsghdr in send_dg [BZ #23037]
Florian Weimer [Mon, 9 Apr 2018 08:08:07 +0000 (10:08 +0200)] 
resolv: Fully initialize struct mmsghdr in send_dg [BZ #23037]

(cherry picked from commit 583a27d525ae189bdfaa6784021b92a9a1dae12e)

3 years agomanual: Various fixes to the mbstouwcs example, and mbrtowc update
Florian Weimer [Thu, 5 Apr 2018 10:52:19 +0000 (12:52 +0200)] 
manual: Various fixes to the mbstouwcs example, and mbrtowc update

The example did not work because the null byte was not converted, and
mbrtowc was called with a zero-length input string.  This results in a
(size_t) -2 return value, so the function always returns NULL.

The size computation for the heap allocation of the result was
incorrect because it did not deal with integer overflow.

Error checking was missing, and the allocated memory was not freed on
error paths.  All error returns now set errno.  (Note that there is an
assumption that free does not clobber errno.)

The slightly unportable comparision against (size_t) -2 to catch both
(size_t) -1 and (size_t) -2 return values is gone as well.

A null wide character needs to be stored in the result explicitly, to
terminate it.

The description in the manual is updated to deal with these finer
points.  The (size_t) -2 behavior (consuming the input bytes) matches
what is specified in ISO C11.

(cherry picked from commit cf138b0c83b3210990b29772e2af5982fb0e3c26)
(cherry picked from commit 690c3475f1417c99cb0fc69f35d77560c24c1d69)

3 years agomanual: Move mbstouwcs to an example C file
Florian Weimer [Thu, 5 Apr 2018 10:50:58 +0000 (12:50 +0200)] 
manual: Move mbstouwcs to an example C file

(cherry picked from commit 0f339252697e6dcfc9e00be6cd8272d4260b90d2)

3 years agoUpdate RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947]
H.J. Lu [Tue, 3 Apr 2018 19:19:20 +0000 (12:19 -0700)] 
Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947]

Add RWF_APPEND to RWF_SUPPORTED to support Linux kernel 4.16.

[BZ #22947]
* bits/uio-ext.h (RWF_APPEND): New.
* sysdeps/unix/sysv/linux/bits/uio-ext.h (RWF_APPEND): Likewise.
* manual/llio.texi: Document RWF_APPEND.
* misc/tst-preadvwritev2-common.c (RWF_APPEND): New.
(RWF_SUPPORTED): Add RWF_APPEND.

(cherry picked from commit f2652643d7234c08205b75f527191c2e2b35251f)

3 years agogetlogin_r: return early when linux sentinel value is set
Jesse Hathaway [Tue, 27 Mar 2018 21:17:59 +0000 (21:17 +0000)] 
getlogin_r: return early when linux sentinel value is set

When there is no login uid Linux sets /proc/self/loginid to the sentinel
value of, (uid_t) -1. If this is set we can return early and avoid
needlessly looking up the sentinel value in any configured nss
databases.

Checked on aarch64-linux-gnu.

* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Return
early when linux sentinel value is set.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit cc8a1620eb97ccddd337d157263c13c57b39ab71)

3 years agoFix crash in resolver on memory allocation failure (bug 23005)
Andreas Schwab [Tue, 27 Mar 2018 10:16:11 +0000 (12:16 +0200)] 
Fix crash in resolver on memory allocation failure (bug 23005)

(cherry picked from commit f178e59fa5eefbbd37fde040ae8334aa5c857ee1)

3 years agoFix signed integer overflow in random_r (bug 17343).
Joseph Myers [Tue, 20 Mar 2018 18:25:24 +0000 (18:25 +0000)] 
Fix signed integer overflow in random_r (bug 17343).

Bug 17343 reports that stdlib/random_r.c has code with undefined
behavior because of signed integer overflow on int32_t.  This patch
changes the code so that the possibly overflowing computations use
unsigned arithmetic instead.

Note that the bug report refers to "Most code" in that file.  The
places changed in this patch are the only ones I found where I think
such overflow can occur.

Tested for x86_64 and x86.

[BZ #17343]
* stdlib/random_r.c (__random_r): Use unsigned arithmetic for
possibly overflowing computations.

(cherry picked from commit 8a07b0c43c46a480da070efd53a2720195e2256f)

3 years agoAdd tst-sigaction.c to test BZ #23069
Aurelien Jarno [Thu, 26 Apr 2018 20:21:13 +0000 (22:21 +0200)] 
Add tst-sigaction.c to test BZ #23069

This simple test uses sigaction to define a signal handler. It then
uses sigaction again to fetch the information about the same signal
handler, and check that they are consistent. This is enough to detect
mismatches between struct kernel_sigaction and the kernel version of
struct sigaction, like in BZ #23069.

Changelog:
       * signal/tst-sigaction.c: New file to test BZ #23069.
       * signal/Makefile (tests): Fix indentation. Add tst-sigaction.

(cherry picked from commit 7a6f74787132aca8e3809cae8d9e7bc7bfd55ce1)

3 years agoRISC-V: fix struct kernel_sigaction to match the kernel version [BZ #23069]
Aurelien Jarno [Sat, 28 Apr 2018 11:13:43 +0000 (13:13 +0200)] 
RISC-V: fix struct kernel_sigaction to match the kernel version [BZ #23069]

The RISC-V kernel doesn't define SA_RESTORER, hence the kernel version
of struct sigaction doesn't have the sa_restorer field. The default
kernel_sigaction.h therefore can't be used.

This patch adds a RISC-V specific version of kernel_sigaction.h to fix
the issue. This fixes for example the libnih testsuite.

Note that this patch is not needed in master as the bug has been fixed
by commit b4a5d26d8835 ("linux: Consolidate sigaction implementation").

3 years agoLinux i386: tst-bz21269 triggers SIGBUS on some kernels
Florian Weimer [Thu, 29 Mar 2018 09:42:24 +0000 (11:42 +0200)] 
Linux i386: tst-bz21269 triggers SIGBUS on some kernels

In addition to SIGSEGV and SIGILL, SIGBUS is also a possible signal
generated by the kernel.

(cherry picked from commit 4d76d3e59d31aa690f148fc0c95cc0c581aed3e8)

3 years agoFix i386 memmove issue (bug 22644).
Andrew Senkevich [Fri, 23 Mar 2018 15:19:45 +0000 (16:19 +0100)] 
Fix i386 memmove issue (bug 22644).

[BZ #22644]
* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Fixed
branch conditions.
* string/test-memmove.c (do_test2): New testcase.

(cherry picked from commit cd66c0e584c6d692bc8347b5e72723d02b8a8ada)

3 years agoUpdate ChangeLog for BZ 22884 - riscv fmax/fmin
DJ Delorie [Fri, 23 Feb 2018 21:08:08 +0000 (16:08 -0500)] 
Update ChangeLog for BZ 22884 - riscv fmax/fmin

(cherry picked from commit 7e04eb2932d3126c721ee2bc0d664a5bbea2f41f)

3 years agoRISC-V: fmax/fmin: Handle signalling NaNs correctly.
Andrew Waterman [Thu, 22 Feb 2018 19:31:54 +0000 (14:31 -0500)] 
RISC-V: fmax/fmin: Handle signalling NaNs correctly.

RISC-V's fmax(sNAN,4) returns 4 but glibc expects it to return qNAN.

* sysdeps/riscv/rvd/s_fmax.c (__fmax): Handle sNaNs correctly.
* sysdeps/riscv/rvd/s_fmin.c (__fmin): Likewise.
* sysdeps/riscv/rvf/s_fmaxf.c (__fmaxf): Likewise.
* sysdeps/riscv/rvf/s_fminf.c (__fminf): Likewise.

(cherry picked from commit fdcc625376505eacb1125a6aeba57501407a30ec)

3 years agoRISC-V: Do not initialize $gp in TLS macros.
DJ Delorie [Thu, 22 Feb 2018 19:28:47 +0000 (14:28 -0500)] 
RISC-V: Do not initialize $gp in TLS macros.

RISC-V TLS doesn't require GP to be initialized, and doing so breaks
TLS in a shared object.

(cherry picked from commit 8090720a87e42fddc31396f6126112d4b8014d8e)

3 years agoNEWS: Add entries for bugs: 22848, 22932, 22937, 22963.
Rafal Luzynski [Thu, 15 Mar 2018 02:29:07 +0000 (03:29 +0100)] 
NEWS: Add entries for bugs: 22848, 22932, 22937, 22963.

Alternative (nominative/genitive) month names have been added to the
Catalan and Czech locale data and the abbreviated alternative names to
Catalan and Greek.

(cherry picked from commit c553cd6f7e939ae4ef62b52b3c55fbe76dddecee)

3 years agocs_CZ locale: Add alternative month names (bug 22963).
Rafal Luzynski [Mon, 17 Oct 2016 20:06:11 +0000 (22:06 +0200)] 
cs_CZ locale: Add alternative month names (bug 22963).

Add alternative month names, primary month names are genitive now.

[BZ #22963]
* localedata/locales/cs_CZ (mon): Rename to...
(alt_mon): This.
(mon): Import from CLDR (genitive case).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 807fee29d2c967e24e3fe05e2182ba53e96e9178)

3 years agoGreek (el_CY, el_GR) locales: Introduce ab_alt_mon (bug 22937).
Rafal Luzynski [Wed, 7 Mar 2018 23:45:04 +0000 (00:45 +0100)] 
Greek (el_CY, el_GR) locales: Introduce ab_alt_mon (bug 22937).

As spotted by GNOME translation team, Greek language has the actually
visible difference between the abbreviated nominative and the abbreviated
genitive case for some month names.  Examples:

and more month names with similar differences.

Original discussion: https://bugzilla.gnome.org/show_bug.cgi?id=793645#c21

[BZ #22937]
* localedata/locales/el_CY (abmon): Rename to...
(ab_alt_mon): This.
(abmon): Import from CLDR (abbreviated genitive case).
* localedata/locales/el_GR (abmon): Rename to...
(ab_alt_mon): This.
(abmon): Import from CLDR (abbreviated genitive case).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit e7155a28ef61f240da156e1cea410b61afca14ad)

7 years agolt_LT locale: Update abbreviated month names (bug 22932).
Rafal Luzynski [Wed, 7 Mar 2018 23:38:18 +0000 (00:38 +0100)] 
lt_LT locale: Update abbreviated month names (bug 22932).

A GNOME translator asked to use the same abbreviated month names
as provided by CLDR.  This sounds reasonable.  See the discussion:
https://bugzilla.gnome.org/show_bug.cgi?id=793645#c27

[BZ #22932]
* localedata/locales/lt_LT (abmon): Synchronize with CLDR.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 71d7b121686f6d91cd5a630dcfb72197b5d8284a)

7 years agoca_ES locale: Update LC_TIME (bug 22848).
Robert Buj [Tue, 6 Mar 2018 21:51:29 +0000 (22:51 +0100)] 
ca_ES locale: Update LC_TIME (bug 22848).

Add/fix alternative month names, long & short formats, am_pm,
abday settings, and improve indentation for Catalan.

[BZ #22848]
* localedata/locales/ca_ES (abmon): Rename to...
(ab_alt_mon): This, then synchronize with CLDR (nominative case).
(mon): Rename to...
(alt_mon): This.
(abmon): Import from CLDR (genitive case, month names preceded by
"de" or "d'").
(mon): Likewise.
(abday): Synchronize with CLDR.
(d_t_fmt): Likewise.
(d_fmt): Likewise.
(am_pm): Likewise.

(LC_TIME): Improve indentation.
(LC_TELEPHONE): Likewise.
(LC_NAME): Likewise.
(LC_ADDRESS): Likewise.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit a00bffe8b531693d3b26c1e87afe4b9eac84474c)

7 years agoUpdate translations from the Translation Project
Dmitry V. Levin [Mon, 12 Mar 2018 13:24:46 +0000 (13:24 +0000)] 
Update translations from the Translation Project

* po/pt_BR.po: Update translations.

(cherry picked from commit 778f1974863d63e858b6d0105e41d6f0c30732d3)

7 years agoi386: Fix i386 sigaction sa_restorer initialization (BZ#21269)
Adhemerval Zanella [Fri, 17 Nov 2017 18:04:29 +0000 (16:04 -0200)] 
i386: Fix i386 sigaction sa_restorer initialization (BZ#21269)

This patch fixes the i386 sa_restorer field initialization for sigaction
syscall for kernel with vDSO.  As described in bug report, i386 Linux
(and compat on x86_64) interprets SA_RESTORER clear with nonzero
sa_restorer as a request for stack switching if the SS segment is 'funny'.
This means that anything that tries to mix glibc's signal handling with
segmentation (for instance through modify_ldt syscall) is randomly broken
depending on what values lands in sa_restorer.

The testcase added  is based on Linux test tools/testing/selftests/x86/ldt_gdt.c,
more specifically in do_multicpu_tests function.  The main changes are:

  - C11 atomics instead of plain access.

  - Remove x86_64 support which simplifies the syscall handling and fallbacks.

  - Replicate only the test required to trigger the issue.

Checked on i686-linux-gnu.

[BZ #21269]
* sysdeps/unix/sysv/linux/i386/Makefile (tests): Add tst-bz21269.
* sysdeps/unix/sysv/linux/i386/sigaction.c (SET_SA_RESTORER): Clear
sa_restorer for vDSO case.
* sysdeps/unix/sysv/linux/i386/tst-bz21269.c: New file.

(cherry picked from commit 68448be208ee06e76665918b37b0a57e3e00c8b4)

7 years agoFix multiple definitions of __nss_*_database (bug 22918)
Andreas Schwab [Fri, 2 Mar 2018 22:07:14 +0000 (23:07 +0100)] 
Fix multiple definitions of __nss_*_database (bug 22918)

(cherry picked from commit eaf6753f8aac33a36deb98c1031d1bad7b593d2d)

7 years ago[BZ #22342] Fix netgroup cache keys.
DJ Delorie [Fri, 2 Mar 2018 04:20:45 +0000 (23:20 -0500)] 
[BZ #22342] Fix netgroup cache keys.

Unlike other nscd caches, the netgroup cache contains two types of
records - those for "iterate through a netgroup" (i.e. setnetgrent())
and those for "is this user in this netgroup" (i.e. innetgr()),
i.e. full and partial records.  The timeout code assumes these records
have the same key for the group name, so that the collection of records
that is "this netgroup" can be expired as a unit.

However, the keys are not the same, as the in-netgroup key is generated
by nscd rather than being passed to it from elsewhere, and is generated
without the trailing NUL.  All other keys have the trailing NUL, and as
noted in the linked BZ, debug statements confirm that two keys for the
same netgroup are added to the cache with two different lengths.

The result of this is that as records in the cache expire, the purge
code only cleans out one of the two types of entries, resulting in
stale, possibly incorrect, and possibly inconsistent cache data.

The patch simply includes the existing NUL in the computation for the
key length ('key' points to the char after the NUL, and 'group' to the
first char of the group, so 'key-group' includes the first char to the
NUL, inclusive).

[BZ #22342]
* nscd/netgroupcache.c (addinnetgrX): Include trailing NUL in
key value.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 1c81d55fc4b07b51adf68558ba74ce975153e580)

7 years agolinux/powerpc: sync sys/ptrace.h with Linux 4.15 [BZ #22433, #22807]
Dmitry V. Levin [Sat, 10 Feb 2018 23:19:32 +0000 (23:19 +0000)] 
linux/powerpc: sync sys/ptrace.h with Linux 4.15 [BZ #22433, #22807]

Tested with strace.

* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (__ptrace_request): Add
PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS, PTRACE_SETFPREGS,
PTRACE_GETVRREGS, PTRACE_SETVRREGS, PTRACE_GETEVRREGS,
PTRACE_SETEVRREGS, PTRACE_GETREGS64, PTRACE_SETREGS64,
PTRACE_GET_DEBUGREG, PTRACE_SET_DEBUGREG, PTRACE_GETVSRREGS,
PTRACE_SETVSRREGS, and PTRACE_SINGLEBLOCK.

(cherry picked from commit f5f473a9d0e8fdbede858fa1ef0d01d12142367b)

7 years agopowerpc: Undefine Linux ptrace macros that conflict with __ptrace_request
Tulio Magno Quites Machado Filho [Mon, 26 Feb 2018 13:40:17 +0000 (10:40 -0300)] 
powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request

Linux ptrace headers define macros whose tokens conflict with the
constants of enum __ptrace_request causing build errors when
asm/ptrace.h or linux/ptrace.h are included before sys/ptrace.h.

* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Undefine Linux
macros used in __ptrace_request.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
(cherry picked from commit 398c6fddafcee2dc4c2b2574417a2d0cfccaeec1)

7 years agoAdd missing "reorder-end" in LC_COLLATE of et_EE [BZ #22517]
Mike FABIAN [Mon, 19 Feb 2018 20:59:30 +0000 (21:59 +0100)] 
Add missing "reorder-end" in LC_COLLATE of et_EE [BZ #22517]

[BZ #22517]
* localedata/locales/et_EE (LC_COLLATE): add missing "reorder-end"

(cherry picked from commit 7ec5f9465e732e668d0dc94ac078ba68056d6d0a)

7 years agoFix a typo in a comment.
Rical Jasan [Wed, 21 Feb 2018 12:00:03 +0000 (04:00 -0800)] 
Fix a typo in a comment.

* io/fcntl.h: Fix a typo in a comment.

(cherry picked from commit 0d217f4082473e5fdca87831df928dd525a02f72)

7 years agomanual: Update the _ISOC99_SOURCE description.
Rical Jasan [Mon, 19 Feb 2018 12:32:35 +0000 (04:32 -0800)] 
manual: Update the _ISOC99_SOURCE description.

The current description refers to ISO C99 not being widely adopted,
which it is believed to be now.

* manual/creature.texi (_ISOC99_SOURCE): Update the dated
description.

(cherry picked from commit e8d190b9ed81a1b342f0969bc2b5505403183bce)

7 years agomanual: Document missing feature test macros.
Rical Jasan [Mon, 19 Feb 2018 11:30:06 +0000 (03:30 -0800)] 
manual: Document missing feature test macros.

Several feature test macros are documented in features.h but absent in
the manual, and some documented macros accept undocumented values.
This commit updates the manual to mention all the accepted macros,
along with any values that hold special meaning.

* manual/creature.texi (_POSIX_C_SOURCE): Document special
values of 199606L, 200112L, and 200809L.
(_XOPEN_SOURCE): Document special values of 600 and 700.
(_ISOC11_SOURCE): Document macro.
(_ATFILE_SOURCE): Likewise.
(_FORTIFY_SOURCE): Likewise.

(cherry picked from commit 6a3962c4a408e8cbc305d2433711196107374e89)
(cherry picked from commit da81ae645d8ee89052f109c814a68a9489f562e6)

7 years agoNEWS: add entries for bugs 22919 and 22926
Dmitry V. Levin [Thu, 8 Mar 2018 23:30:56 +0000 (23:30 +0000)] 
NEWS: add entries for bugs 22919 and 22926

7 years agosparc32: Add nop before __startcontext to stop unwinding [BZ #22919]
Aurelien Jarno [Thu, 8 Mar 2018 23:14:27 +0000 (00:14 +0100)] 
sparc32: Add nop before __startcontext to stop unwinding [BZ #22919]

On sparc32 tst-makecontext fails, as backtrace called within a context
created by makecontext to yield infinite backtrace.

Fix that the same way than nios2 by adding a nop just before
__startcontext. This is needed as otherwise FDE lookup just repeatedly
finds __setcontext's FDE in an infinite loop, due to the convention of
using 'address - 1' for FDE lookup.

Changelog:
[BZ #22919]
* sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S (__startcontext):
Add nop before __startcontext, add explaining comments.

(cherry picked from commit 9aa5c222b9e0409143410a02b6364a3b25dbf028)

7 years agopowerpc: Fix TLE build for SPE (BZ #22926)
Adhemerval Zanella [Mon, 5 Mar 2018 17:46:24 +0000 (14:46 -0300)] 
powerpc: Fix TLE build for SPE (BZ #22926)

Some SPE opcodes clashes with some recent PowerISA opcodes and
until recently gas did not complain about it.  However binutils
recently changed it and now VLE configured gas does not support to
assembler some instruction that might class with VLE (HTM for
instance).  It also does not help that glibc build hardware lock
elision support as default (regardless of assembler support).

Although runtime will not actually enables TLE on SPE hardware
(since kernel will not advertise it), I see little advantage on
adding HTM support on SPE built glibc.  SPE uses an incompatible
ABI which does not allow share the same build with default
powerpc and HTM code slows down SPE without any benefict.

This patch fixes it by only building HTM when SPE configuration
is not used.

Checked with a powerpc-linux-gnuspe build. I also did some sniff
tests on a e500 hardware without any issue.

[BZ #22926]
* sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION_IMPL): Define
empty for __SPE__.
* sysdeps/powerpc/sysdep.h (ABORT_TRANSACTION): Likewise.
* sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__lll_lock_elision):
Do not build hardware transactional code for __SPE__.
* sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
(__lll_trylock_elision): Likewise.
* sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
(__lll_unlock_elision): Likewise.

Cherry-pick from e921c89e01389161c036ec09112da6e18aeaa688.

7 years agomanual: Improve documentation of get_current_dir_name. [BZ #6889]
Rical Jasan [Fri, 16 Feb 2018 16:47:20 +0000 (08:47 -0800)] 
manual: Improve documentation of get_current_dir_name. [BZ #6889]

This is a minor rewording to clarify the behaviour of
get_current_dir_name.  Additionally, the @vindex is moved above the
@deftypefun so that following links give a better result with regard
to context.

[BZ #6889]
* manual/filesys.texi (get_current_dir_name): Clarify
behaviour.

(cherry picked from commit 7d15ef84f50a80cb170f8ce3457010f59e221cb8)

7 years agomanual: Fix a syntax error.
Rical Jasan [Fri, 16 Feb 2018 16:21:47 +0000 (08:21 -0800)] 
manual: Fix a syntax error.

The opening parenthesis for function arguments in an @deftypefun need
to be separated from the function name.  This isn't just a matter of
the GNU coding style---it causes the "(void" (in this case) to be
rendered as a part of the function name, causing a visual defect, and
also results in a warning to the following effect during `make pdf':

  Warning: unbalanced parentheses in @def...)

* manual/platform.texi (__riscv_flush_icache): Fix @deftypefun
syntax.

(cherry picked from commit 16efad5171ac1ac2c8728405f2703045f08c494b)

7 years agomanual: Fix Texinfo warnings about improper node names.
Rical Jasan [Wed, 24 Jan 2018 09:03:38 +0000 (01:03 -0800)] 
manual: Fix Texinfo warnings about improper node names.

A number of cross-references to the GCC info manual cause Texinfo
warnings; e.g.:

  ./creature.texi:11: warning: @xref node name should not contain `.'

This is due to "gcc.info" being used in the INFO-FILE-NAME (fourth)
argument.  Changing it to "gcc" removes these warnings.  (Manually
confirmed equivalent behaviour for make info, html, and pdf.)

* manual/creature.texi: Convert references to gcc.info to gcc.
* manual/stdio.texi: Likewise.
* manual/string.texi: Likewise.

(cherry picked from commit 1f6676d7da1b7c864e9a5d59fe9162a88bd21952)

7 years agoFix posix/tst-glob_lstat_compat on alpha [BZ #22818]
Aurelien Jarno [Sun, 18 Feb 2018 17:23:14 +0000 (18:23 +0100)] 
Fix posix/tst-glob_lstat_compat on alpha [BZ #22818]

The tst-glob_lstat_compat test needs to run tests on the previous
version of glob. On alpha, there are three versions of glob, GLIBC_2.0,
GLIBC_2.1 and GLIBC_2.27, while on other architectures there are only
the GLIBC_2.0 and GLIBC_2.27 version. Therefore on alpha the previous
version is GLIBC_2.1 and not GLIBC_2.0.

Changelog:
[BZ #22818]
* posix/tst-glob_lstat_compat.c [__alpha__] (glob): Access
the GLIBC_2.1 version.

(cherry picked from commit f8d79582896c52cc2b50bdd030a3ec27ef23b587)

7 years agotime: Reference CLOCKS_PER_SEC in clock comment [BZ #22735]
Sean McKean [Fri, 2 Feb 2018 10:59:31 +0000 (11:59 +0100)] 
time: Reference CLOCKS_PER_SEC in clock comment [BZ #22735]

(cherry picked from commit 09e56b9e18f987105e39768f907db800e9330930)

7 years agolinux/aarch64: sync sys/ptrace.h with Linux 4.15 [BZ #22433]
Dmitry V. Levin [Fri, 29 Dec 2017 23:19:32 +0000 (23:19 +0000)] 
linux/aarch64: sync sys/ptrace.h with Linux 4.15 [BZ #22433]

Remove compat-specific constants that were never exported by kernel
headers under these names.  Before linux commit v3.7-rc1~16^2~1 they
were exported with COMPAT_ prefix, and since that commit they are not
exported at all.

* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_request):
Remove arm-specific PTRACE_GET_THREAD_AREA, PTRACE_GETHBPREGS,
and PTRACE_SETHBPREGS.

(cherry picked from commit 2fd4bbaa1446f1be700e10c526cf585a796c4991)

7 years agoNEWS: add an entry for bug 22827
Dmitry V. Levin [Tue, 6 Feb 2018 09:31:30 +0000 (09:31 +0000)] 
NEWS: add an entry for bug 22827

7 years agoUpdate SH libm-tests-ulps
Adhemerval Zanella [Wed, 14 Feb 2018 16:03:13 +0000 (14:03 -0200)] 
Update SH libm-tests-ulps

* sysdeps/sh/libm-test-ulps: Update.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
7 years ago[RISC-V] Fix parsing flags in ELF64 files.
DJ Delorie [Fri, 9 Feb 2018 23:37:15 +0000 (18:37 -0500)] 
[RISC-V] Fix parsing flags in ELF64 files.

When ldconfig reads Elf64 files to determine the ABI, it used the
Elf32 type, so read the wrong location, and stored the wrong ABI
type in the cache, making the cache useless.  This patch uses
an Elf64 type for Elf64 objects instead.

Note that pre-patch caches might need to be manually removed and
regenerated to get the correct ABIs stored.

[BZ #22827]
* sysdeps/unix/sysv/linux/riscv/readelflib.c (process_elf_file): Use
64-bit ELF type for 64-bit ELF objects.

(cherry picked from commit 6a1ff640dcec04905d8518983ad6252d38b7a733)

7 years agoSecond try at dealing with ancient mktemp
Stan Shebs [Fri, 11 May 2018 19:54:53 +0000 (12:54 -0700)] 
Second try at dealing with ancient mktemp

7 years agoDefeat a malloc optimization by declaring things volatile.
Stan Shebs [Wed, 9 May 2018 18:28:09 +0000 (11:28 -0700)] 
Defeat a malloc optimization by declaring things volatile.

7 years agoForestall optimization-out of a buffer.
Stan Shebs [Wed, 9 May 2018 18:26:35 +0000 (11:26 -0700)] 
Forestall optimization-out of a buffer.

7 years agoAdd a clang/lld workaround for symbol not being overridden
Stan Shebs [Wed, 9 May 2018 18:25:42 +0000 (11:25 -0700)] 
Add a clang/lld workaround for symbol not being overridden

7 years agoWork around clang mishandling of assert functions in resolver buffer allocation,...
Stan Shebs [Fri, 20 Apr 2018 21:44:54 +0000 (14:44 -0700)] 
Work around clang mishandling of assert functions in resolver buffer allocation, fixes random error returns in resolv/ tests.

9 years agoAllow suppressing the definition of __USE_FILE_OFFSET64 by defining SUPPRESS_USE_FILE...
Manuel Klimek [Thu, 29 Oct 2015 17:29:55 +0000 (10:29 -0700)] 
Allow suppressing the definition of __USE_FILE_OFFSET64 by defining SUPPRESS_USE_FILE_OFFSET64 in the CROSSTOOL.

11 years agoFor b/5836136, do dlsym(0, "_Unwind..."), i.e. ignore libgcc_s.so.1 dlopen failure.
Paul Pluzhnikov [Tue, 4 Mar 2014 01:03:35 +0000 (17:03 -0800)] 
For b/5836136, do dlsym(0, "_Unwind..."), i.e. ignore libgcc_s.so.1 dlopen failure.

7 years agoDefine __GOOGLE_GRTE_VERSION__
Stan Shebs [Thu, 29 Mar 2018 21:05:07 +0000 (14:05 -0700)] 
Define __GOOGLE_GRTE_VERSION__

7 years agoAdd basic testsuite for dlopen_with_offset
Stan Shebs [Thu, 29 Mar 2018 18:48:37 +0000 (11:48 -0700)] 
Add basic testsuite for dlopen_with_offset

7 years agoAdd a hunk lost in merge
Stan Shebs [Thu, 29 Mar 2018 03:31:52 +0000 (20:31 -0700)] 
Add a hunk lost in merge

7 years agoFix GCC compilation issues in cherrypicks
Stan Shebs [Thu, 29 Mar 2018 02:31:45 +0000 (19:31 -0700)] 
Fix GCC compilation issues in cherrypicks

9 years agoFor b/22641205, #include _itoa.h
Paul Pluzhnikov [Sat, 10 Oct 2015 16:26:54 +0000 (09:26 -0700)] 
For b/22641205, #include _itoa.h

9 years agoFor b/20141439, don't add "foo.so" as alternate name for previously loaded "foo.so...
Paul Pluzhnikov [Fri, 2 Oct 2015 14:31:16 +0000 (07:31 -0700)] 
For b/20141439, don't add "foo.so" as alternate name for previously loaded "foo.so/@0x..."

10 years agoFor b/8315591, b/20141439 correct off-by-one error that resulted in last byte of...
Paul Pluzhnikov [Wed, 3 Jun 2015 15:58:35 +0000 (08:58 -0700)] 
For b/8315591, b/20141439 correct off-by-one error that resulted in last byte of l_name being random garbage.

10 years agoFix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable...
Paul Pluzhnikov [Mon, 24 Nov 2014 02:12:56 +0000 (18:12 -0800)] 
Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable __google_dlopen_with_offset in fully-static link

10 years agoFor b/18243822, fix dlopen_with_offset to not reuse the same link_map entry when...
Paul Pluzhnikov [Mon, 10 Nov 2014 18:56:25 +0000 (10:56 -0800)] 
For b/18243822, fix dlopen_with_offset to not reuse the same link_map entry when called on the same file with different offsets.

11 years agoFor Google b/8315591, experimental implementation of dlopen_with_offset.
Paul Pluzhnikov [Mon, 10 Mar 2014 21:02:07 +0000 (14:02 -0700)] 
For Google b/8315591, experimental implementation of dlopen_with_offset.

11 years agoDisable static linking warning for dlopen and dlmopen, and disable linking warning...
Paul Pluzhnikov [Sat, 1 Mar 2014 00:51:12 +0000 (16:51 -0800)] 
Disable static linking warning for dlopen and dlmopen, and disable linking warning for sys_errlist and sys_nerr.

9 years agoBackport cl/98967227 to GRTE glibc 2.19 sources.
Brooks Moses [Sat, 15 Aug 2015 05:32:51 +0000 (22:32 -0700)] 
Backport cl/98967227 to GRTE glibc 2.19 sources.

7 years agoAdd empty NSS borg and cache abi lists, to make testsuite work
Stan Shebs [Mon, 19 Mar 2018 18:04:23 +0000 (11:04 -0700)] 
Add empty NSS borg and cache abi lists, to make testsuite work

7 years agoFix out-of-date bits in EXEC_ORIGIN patch
Stan Shebs [Mon, 19 Mar 2018 16:41:11 +0000 (09:41 -0700)] 
Fix out-of-date bits in EXEC_ORIGIN patch

11 years agoFor b/12342355, remove inappropriate assert in EXEC_ORIGIN support.
Brooks Moses [Fri, 11 Apr 2014 20:37:15 +0000 (13:37 -0700)] 
For b/12342355, remove inappropriate assert in EXEC_ORIGIN support.

11 years agoFor b/4074041, add EXEC_ORIGIN support. Forward-ported from cl/56955623 and http...
Paul Pluzhnikov [Sat, 8 Mar 2014 23:12:52 +0000 (15:12 -0800)] 
For b/4074041, add EXEC_ORIGIN support. Forward-ported from cl/56955623 and http://cl/59961863.

8 years agoHandle a not-found case in borg passwd lookup
Stan Shebs [Thu, 3 Nov 2016 23:31:52 +0000 (16:31 -0700)] 
Handle a not-found case in borg passwd lookup

8 years agoCall the correct function.
Michael Rothwell [Fri, 30 Sep 2016 16:46:48 +0000 (09:46 -0700)] 
Call the correct function.

8 years agoAugment borg-pwd to also search through passwd.borg.base, if it exists.
Michael Rothwell [Fri, 30 Sep 2016 13:09:04 +0000 (06:09 -0700)] 
Augment borg-pwd to also search through passwd.borg.base, if it exists.

9 years agoDescribe borg-pwd better, remove dead code.
Stan Shebs [Fri, 21 Aug 2015 21:50:53 +0000 (14:50 -0700)] 
Describe borg-pwd better, remove dead code.

9 years agoUpdate nss_cache.c and nss_cache.h to current upstream version. This makes getgrgid_r...
Max Kanat-Alexander [Wed, 6 Jul 2016 21:47:51 +0000 (14:47 -0700)] 
Update nss_cache.c and nss_cache.h to current upstream version. This makes getgrgid_r and similar calls over 18x faster on corp machines.

7 years agoUpdate an include path
Stan Shebs [Wed, 14 Mar 2018 15:17:45 +0000 (08:17 -0700)] 
Update an include path

11 years agoIntegrate nss_{borg,cache} local changes from glibc-2.18 to 2.19
Paul Pluzhnikov [Fri, 28 Feb 2014 20:54:06 +0000 (12:54 -0800)] 
Integrate nss_{borg,cache} local changes from glibc-2.18 to 2.19

7 years agoForward-port addition of _google_dl_debug_state_hook
Stan Shebs [Tue, 13 Mar 2018 18:53:48 +0000 (11:53 -0700)] 
Forward-port addition of _google_dl_debug_state_hook

7 years agoAs with gettimeofday, avoid vdso for clang-compiled time()
Stan Shebs [Tue, 13 Mar 2018 18:37:02 +0000 (11:37 -0700)] 
As with gettimeofday, avoid vdso for clang-compiled time()

7 years agoForward-port addition of __google_pthread_signal_safe_key_create
Stan Shebs [Mon, 12 Mar 2018 21:59:51 +0000 (14:59 -0700)] 
Forward-port addition of __google_pthread_signal_safe_key_create

7 years agoAdd a Google-only workaround for an ancient mktemp
Stan Shebs [Wed, 7 Mar 2018 15:46:50 +0000 (07:46 -0800)] 
Add a Google-only workaround for an ancient mktemp

7 years agoBypass gettimeofday ifunc if using clang
Stan Shebs [Fri, 2 Mar 2018 16:39:57 +0000 (08:39 -0800)] 
Bypass gettimeofday ifunc if using clang

7 years agoAdd workarounds for clang and lld problems
Stan Shebs [Tue, 27 Feb 2018 19:22:13 +0000 (11:22 -0800)] 
Add workarounds for clang and lld problems

7 years agoSkip a test that lld cannot handle
Stan Shebs [Tue, 27 Feb 2018 19:17:27 +0000 (11:17 -0800)] 
Skip a test that lld cannot handle

7 years agoDisable non-opt error temporarily, and __sec_comment for clang
Stan Shebs [Mon, 26 Feb 2018 21:50:53 +0000 (13:50 -0800)] 
Disable non-opt error temporarily, and __sec_comment for clang

7 years agoRemove a testing hack
Stan Shebs [Tue, 20 Feb 2018 17:13:13 +0000 (09:13 -0800)] 
Remove a testing hack

7 years agoRemove debugging hack
Stan Shebs [Tue, 20 Feb 2018 17:12:01 +0000 (09:12 -0800)] 
Remove debugging hack

7 years agoUse LN_S in more places to forestall hard link creation
Stan Shebs [Wed, 14 Feb 2018 17:44:15 +0000 (09:44 -0800)] 
Use LN_S in more places to forestall hard link creation

7 years agoAdd a --with-lld option to choose LLVMs lld linker
Stan Shebs [Wed, 14 Feb 2018 17:15:44 +0000 (09:15 -0800)] 
Add a --with-lld option to choose LLVMs lld linker

3 years agoUse clang integrated assembler except when asm is output and not required to be valid
Stan Shebs [Fri, 27 Aug 2021 22:28:23 +0000 (15:28 -0700)] 
Use clang integrated assembler except when asm is output and not required to be valid

7 years agoAdd workaround to get clang to accept avx-512 instructions
Stan Shebs [Wed, 7 Feb 2018 20:57:16 +0000 (12:57 -0800)] 
Add workaround to get clang to accept avx-512 instructions

7 years agoWork around clang assembler error with bnd by itself on a line
Stan Shebs [Wed, 7 Feb 2018 20:55:59 +0000 (12:55 -0800)] 
Work around clang assembler error with bnd by itself on a line

7 years agoWork around clang assembler error with movzx
Stan Shebs [Wed, 7 Feb 2018 20:54:57 +0000 (12:54 -0800)] 
Work around clang assembler error with movzx

7 years agoWork around clang assembler bug with expressions in .if
Stan Shebs [Wed, 7 Feb 2018 20:53:40 +0000 (12:53 -0800)] 
Work around clang assembler bug with expressions in .if

7 years agoWork around lack of .tfloat in clang assembler
Stan Shebs [Tue, 6 Feb 2018 23:53:53 +0000 (15:53 -0800)] 
Work around lack of .tfloat in clang assembler

7 years agoPut CMPLX* macros under ISO C11
Stan Shebs [Wed, 24 Jan 2018 20:49:39 +0000 (12:49 -0800)] 
Put CMPLX* macros under ISO C11

7 years agoAdd clang and debug support to conformance scripts
Stan Shebs [Wed, 24 Jan 2018 20:42:41 +0000 (12:42 -0800)] 
Add clang and debug support to conformance scripts

7 years agoComment out debugging hack that pollutes namespace
Stan Shebs [Wed, 24 Jan 2018 19:32:36 +0000 (11:32 -0800)] 
Comment out debugging hack that pollutes namespace

7 years agoDo not pass unhandled flag to clang
Stan Shebs [Tue, 23 Jan 2018 20:53:28 +0000 (12:53 -0800)] 
Do not pass unhandled flag to clang

7 years agoAdd workarounds for incomplete float128 support in clang
Stan Shebs [Tue, 23 Jan 2018 17:41:49 +0000 (09:41 -0800)] 
Add workarounds for incomplete float128 support in clang

7 years agoclang requires -mno-see for 387 math
Stan Shebs [Tue, 23 Jan 2018 17:40:20 +0000 (09:40 -0800)] 
clang requires -mno-see for 387 math

7 years agoWork around a weird clang link failure
Stan Shebs [Tue, 23 Jan 2018 17:37:55 +0000 (09:37 -0800)] 
Work around a weird clang link failure

7 years agoFor now, disable asm definitions of mempcpy and strpcpy
Stan Shebs [Tue, 23 Jan 2018 17:36:14 +0000 (09:36 -0800)] 
For now, disable asm definitions of mempcpy and strpcpy

7 years agoMake zero volatile to defeat constant-folding of 0.0/0.0
Stan Shebs [Tue, 23 Jan 2018 16:28:31 +0000 (08:28 -0800)] 
Make zero volatile to defeat constant-folding of 0.0/0.0

7 years agoReduce an error to warning if clang
Stan Shebs [Tue, 23 Jan 2018 16:26:39 +0000 (08:26 -0800)] 
Reduce an error to warning if clang