about summary refs log tree commit diff
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* hurd: fix timer_routines.c buildSamuel Thibault2018-02-271-0/+1
| | | | | * sysdeps/pthread/timer_routines.c: [!defined DELAYTIMER_MAX] (DELAYTIMER_MAX): Define to INT_MAX.
* Move NPTL-specific code to NPTL-specific headerSamuel Thibault2018-02-271-0/+7
| | | | | | | * sysdeps/pthread/timer_routines.c: Include <timer_routines.h> instead of <nptl/pthreadP.h> (thread_attr_compare): Move function to... * sysdeps/nptl/timer_routines.h: ... new header.
* Fix another -Os strcoll build issue.Joseph Myers2018-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | While there are now clean -Os build and test results on x86_64 (given my patch <https://sourceware.org/ml/libc-alpha/2018-02/msg00602.html>, pending review), testing with -Os with build-many-glibcs.py shows the build is still failing with -Os everywhere except for x86_64, x86 and s390x. There are a variety of different build failures, but the most common seem to be in strcoll / wcscoll, similar to existing such cases where DIAG_* are used to disable -Wmaybe-uninitialized. There are various different failures even within those functions. This patch fixes one particular case that seems quite common, where the warning appears at the declarations of seq1 and seq2. Tested with build-many-glibcs.py that this fixes the -Os build for aarch64-linux-gnu with GCC 7. * string/strcoll_l.c: Include <libc-diag.h>. (STRCOLL): Ignore -Wmaybe-uninitialized for -Os around declarations of seq1 and seq2.
* Use libc_hidden_* for atoi (bug 15105).Joseph Myers2018-02-261-0/+6
| | | | | | | | | | | | | | Continuing the fixes for localplt test failures with -Os arising from functions not being inlined in that case, this patch fixes such failures for atoi by using libc_hidden_proto and libc_hidden_def. Tested for x86_64 (both that it removes this particular localplt failure for -Os, and that the testsuite continues to pass without -Os). [BZ #15105] * stdlib/atoi.c (atoi): Use libc_hidden_def. * include/stdlib.h [!_ISOMAC] (atoi): Use libc_hidden_proto.
* linux/powerpc: sync sys/ptrace.h with Linux 4.15 [BZ #22433, #22807]Dmitry V. Levin2018-02-261-0/+11
| | | | | | | | | | | 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.
* powerpc: Undefine Linux ptrace macros that conflict with __ptrace_requestTulio Magno Quites Machado Filho2018-02-261-0/+5
| | | | | | | | | | | 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>
* Fix a typo in ChangeLog (bit_cpu_BIT -> bit_cpu_IBT)H.J. Lu2018-02-261-1/+1
|
* Update ChangeLog for BZ 22884 - riscv fmax/fminDJ Delorie2018-02-231-0/+1
|
* Define GEN_AS_CONST_HEADERS when generating header files [BZ #22792]H.J. Lu2018-02-231-0/+10
| | | | | | | | | | | | | | | | | | | | | Glibc build generates header files to define constants from special .sym files. If a .sym file includes the same header file which it generates, it leads to circular dependency which may lead to build hang on a many-core machine. Define GEN_AS_CONST_HEADERS when generating header files to avoid circular dependency. <tcb-offsets.h> is needed for i686 and it isn't needed for x86-64 at least since glibc 2.23. Tested on i686 and x86-64. [BZ #22792] * Makerules ($(common-objpfx)%.h): Pass -DGEN_AS_CONST_HEADERS to $(CC). * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Include <tcb-offsets.h> only if GEN_AS_CONST_HEADERS isn't defined. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't include <tcb-offsets.h>.
* Use libc_hidden_* for tolower, toupper (bug 15105).Joseph Myers2018-02-231-0/+8
| | | | | | | | | | | | | | | | | | | Continuing the fixes for localplt test failures with -Os arising from functions not being inlined in that case, this patch fixes such failures for tolower and toupper by using libc_hidden_proto and libc_hidden_def. Tested for x86_64 (both that it removes this particular localplt failure for -Os, and that the testsuite continues to pass without -Os). 2018-02-22 Joseph Myers <joseph@codesourcery.com> [BZ #15105] * ctype/ctype.c (tolower): Use libc_hidden_def. (toupper): Likewise. * include/ctype.h [!_ISOMAC] (tolower): Use libc_hidden_proto. [!_ISOMAC] (toupper): Likewise.
* Remove --quiet argument when installing localesMike FABIAN2018-02-231-0/+5
| | | | | | | Using this argument hides problems. I would like to see when something fails. * localedata/Makefile: Remove --quiet argument when installing locales
* Use / instead of - in d_fmt for pt_BR and pt_PT [BZ #17438]Mike FABIAN2018-02-231-0/+7
| | | | | | | [BZ #17438] * localedata/locales/pt_BR (LC_TIME): use / instead of - in d_fmt. * localedata/locales/pt_PT (LC_TIME): likewise
* Use “copy "es_BO"” in LC_TIME of es_CU, es_CL, and es_ECMike FABIAN2018-02-231-0/+7
| | | | | | | | | | LC_TIME in these 4 locales is identical, using “copy "es_BO"” makes that more obvious. [BZ #22646] * localedata/locales/es_CL (LC_TIME): copy "es_BO". * localedata/locales/es_CU (LC_TIME): copy "es_BO". * localedata/locales/es_EC (LC_TIME): copy "es_BO".
* Update sparc ulpsAdhemerval Zanella2018-02-221-0/+2
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Refactor atfork handlersAdhemerval Zanella2018-02-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation (sysdeps/nptl/fork.c) replicates the atfork handlers list backward to invoke the child handlers after fork/clone syscall. The internal atfork handlers is implemented as a single-linked list so a lock-free algorithm can be used, trading fork mulithread call performance for some code complexity and dynamic stack allocation (since the backwards list should not fail). This patch refactor it to use a dynarary instead of a linked list. It simplifies the external variables need to be exported and also the internal atfork handler member definition. The downside is a serialization of fork call in multithread, since to operate on the dynarray the internal lock should be used. However as noted by Florian, it already acquires external locks for malloc and libio so it is already hitting some lock contention. Besides, posix_spawn should be faster and more scalable to run external programs in multithread environments. Checked on x86_64-linux-gnu. * nptl/Makefile (routines): Remove unregister-atfork. * nptl/register-atfork.c (fork_handler_pool): Remove variable. (fork_handler_alloc): Remove function. (fork_handlers, fork_handler_init): New variables. (__fork_lock): Rename to atfork_lock. (__register_atfork, __unregister_atfork, libc_freeres_fn): Rewrite to use a dynamic array to add/remove atfork handlers. * sysdeps/nptl/fork.c (__libc_fork): Likewise. * sysdeps/nptl/fork.h (__fork_lock, __fork_handlers, __linkin_atfork): Remove declaration. (fork_handler): Remove next, refcntr, and need_signal member. (__run_fork_handler_type): New enum. (__run_fork_handlers): New prototype. * sysdeps/nptl/libc-lockP.h (__libc_atfork): Remove declaration.
* Rename nptl-signals.h to internal-signals.hAdhemerval Zanella2018-02-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | This patch renames the nptl-signals.h header to internal-signals.h. On Linux the definitions and functions are not only NPTL related, but used for other POSIX definitions as well (for instance SIGTIMER for posix times, SIGSETXID for id functions, and signal block/restore helpers) and since generic functions will be places and used in generic implementation it makes more sense to decouple it from NPTL. Checked on x86_64-linux-gnu. * sysdeps/nptl/nptl-signals.h: Move to ... * sysdeps/generic/internal-signals.h: ... here. Adjust internal comments. * sysdeps/unix/sysv/linux/internal-signals.h: Add include guards. (__nptl_is_internal_signal): Rename to __is_internal_signal. (__nptl_clear_internal_signals): Rename to __clear_internal_signals. * sysdeps/unix/sysv/linux/raise.c: Adjust nptl-signal.h to include-signals.h rename. * nptl/pthreadP.h: Likewise. * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Call __is_internal_signal instead of __nptl_is_internal_signal.
* RISC-V: fmax/fmin: Handle signalling NaNs correctly.Andrew Waterman2018-02-221-0/+7
| | | | | | | | | 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.
* RISC-V: Do not initialize $gp in TLS macros.DJ Delorie2018-02-221-0/+4
| | | | | RISC-V TLS doesn't require GP to be initialized, and doing so breaks TLS in a shared object.
* aarch64/strcmp: fix misaligned loop jump targetSiddhesh Poyarekar2018-02-221-0/+5
| | | | | | | | | I accidentally set the loop jump back label as misaligned8 instead of do_misaligned. The typo is harmless but it's always nice to not have to unnecessarily execute those two instructions. * sysdeps/aarch64/strcmp.S (do_misaligned): Jump back to do_misaligned, not misaligned8.
* IFUNC for Cavium ThunderX2Steve Ellcey2018-02-221-0/+17
| | | | | | | | | | | | | | | | | * sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memcpy_thunderx2. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (MAX_IFUNC): Increment to 4. (__libc_ifunc_impl_list): Add __memcpy_thunderx2. * sysdeps/aarch64/multiarch/memcpy.c (libc_ifunc): Add IS_THUNDERX2 and IS_THUNDERX2PA checks. * sysdeps/aarch64/multiarch/memcpy_thunderx.S (USE_THUNDERX2): Use macro to set name appropriately. (memcpy): Use USE_THUNDERX2 macro to modify prefetches. * sysdeps/aarch64/multiarch/memcpy_thunderx2.S: New file. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_THUNDERX2PA): New macro. (IS_THUNDERX2): New macro.
* Add [BZ #16335] annotation to ChangeLog entry.Rical Jasan2018-02-221-0/+1
| | | | | Commit 6a3962c4a408e8cbc305d2433711196107374e89 unwittingly fixed a bug, so update the ChangeLog entry accordingly.
* S390: Regenerate ULPs.Stefan Liebler2018-02-221-0/+4
| | | | | | | | | | After regenerating ULPs from scratch in commit 8e7196c8759287a3e4c882e3c7cf32ddc322df8a, I've missed to test it with multiple gcc versions. Hence, here is a further update. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* hurd: Add sysdep-cancel.hSamuel Thibault2018-02-211-0/+1
|
* Remove miscellaneous debris from libio.Zack Weinberg2018-02-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates a number of #if 0 and #ifdef TODO blocks, macros that are never used, macros that provide portability to substrates that lack basic things like EINVAL and off_t, and other such debris. I preserved IO_DEBUG and CHECK_FILE, even though as far as I can tell IO_DEBUG is never defined and therefore CHECK_FILE never does anything, because it seems like we might actually want to turn it _on_. Installed stripped libraries and executables are unchanged, except, again, that the line number of an assertion changes (this time it's somewhere in fileops.c). * libio/libio.h (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Define here, unconditionally. * libio/iolibio.h (_IO_pos_BAD): Don't define here. * libio/libioP.h: Remove #if 0 blocks. (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Don't define here. (_IO_va_start, COERCE_FILE, MAYBE_SET_EINVAL): Don't define. (CHECK_FILE): Don't use MAYBE_SET_EINVAL or COERCE_FILE. Fix style. * libio/clearerr.c, libio/fputc.c, libio/getchar.c: Assume weak_alias is always defined. * libio/fileops.c, libio/genops.c, libio/oldfileops.c * libio/oldpclose.c, libio/pclose.c, libio/wfileops.c: Remove #if 0 and #ifdef TODO blocks. Assume text_set_element is always defined. * libio/iofdopen.c, libio/iogetdelim.c, libio/oldiofdopen.c Use __set_errno (EINVAL) instead of MAYBE_SET_EINVAL. * libio/tst-mmap-eofsync.c: Make #if 1 block unconditional.
* Remove _IO_file_flags define.Zack Weinberg2018-02-211-0/+14
| | | | | | | | | | This entirely mechanical (except for some indentation fixups) patch replaces all uses of _IO_file_flags with _flags and removes the #define. Installed stripped libraries and executables are unchanged by this patch. * libio/libio.h (_IO_file_flags): Remove macro. All uses changed to _flags.
* Remove legacy configuration knobs from libio.Zack Weinberg2018-02-211-0/+10
| | | | | | | | | | | | | | | | | | | | This patch eliminates the "compatibility defines" _IO_UNIFIED_JUMPTABLES (always defined to 1, used in a number of #ifs which are therefore always false), _STDIO_USES_IOSTREAM (unused), __HAVE_COLUMN (unused), _IO_BE (replaced with __glibc_unlikely), and yet another redundant definition of EOF. Installed stripped libraries are unchanged by this patch. * libio/libio.h (_IO_UNIFIED_JUMPTABLES, _STDIO_USES_IOSTREAM) (__HAVE_COLUMN, _IO_BE): Don't define. (_IO_peekc_unlocked, _IO_getwc_unlocked, _IO_putwc_unlocked) (_IO_fwide_maybe_incompatible): Use __glibc_unlikely. * libio/libioP.h (EOF): Don't define. * libio/iofdopen.c, libio/iofopen.c, libio/iopopen.c * libio/iovdprintf.c, libio/oldiofdopen.c, libio/oldiofopen.c * libio/oldiopopen.c, debug/vdprintf_chk.c: Remove #if block testing _IO_UNIFIED_JUMPTABLES.
* Mechanically remove _IO_ name aliases for types and constants.Zack Weinberg2018-02-211-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch mechanically removes all remaining uses, and the definitions, of the following libio name aliases: name replaced with ---- ------------- _IO_FILE FILE _IO_fpos_t __fpos_t _IO_fpos64_t __fpos64_t _IO_size_t size_t _IO_ssize_t ssize_t or __ssize_t _IO_off_t off_t _IO_off64_t off64_t _IO_pid_t pid_t _IO_uid_t uid_t _IO_wint_t wint_t _IO_va_list va_list or __gnuc_va_list _IO_BUFSIZ BUFSIZ _IO_cookie_io_functions_t cookie_io_functions_t __io_read_fn cookie_read_function_t __io_write_fn cookie_write_function_t __io_seek_fn cookie_seek_function_t __io_close_fn cookie_close_function_t I used __fpos_t and __fpos64_t instead of fpos_t and fpos64_t because the definitions of fpos_t and fpos64_t depend on the largefile mode. I used __ssize_t and __gnuc_va_list in a handful of headers where namespace cleanliness might be relevant even though they're internal-use-only. In all other cases, I used the public-namespace name. There are a tiny handful of places where I left a use of 'struct _IO_FILE' alone, because it was being used together with 'struct _IO_FILE_plus' or 'struct _IO_FILE_complete' in the same arithmetic expression. Because this patch was almost entirely done with search and replace, I may have introduced indentation botches. I did proofread the diff, but I may have missed something. The ChangeLog below calls out all of the places where this was not a pure search-and-replace change. Installed stripped libraries and executables are unchanged by this patch, except that some assertions in vfscanf.c change line numbers. * libio/libio.h (_IO_FILE): Delete; all uses changed to FILE. (_IO_fpos_t): Delete; all uses changed to __fpos_t. (_IO_fpos64_t): Delete; all uses changed to __fpos64_t. (_IO_size_t): Delete; all uses changed to size_t. (_IO_ssize_t): Delete; all uses changed to ssize_t or __ssize_t. (_IO_off_t): Delete; all uses changed to off_t. (_IO_off64_t): Delete; all uses changed to off64_t. (_IO_pid_t): Delete; all uses changed to pid_t. (_IO_uid_t): Delete; all uses changed to uid_t. (_IO_wint_t): Delete; all uses changed to wint_t. (_IO_va_list): Delete; all uses changed to va_list or __gnuc_va_list. (_IO_BUFSIZ): Delete; all uses changed to BUFSIZ. (_IO_cookie_io_functions_t): Delete; all uses changed to cookie_io_functions_t. (__io_read_fn): Delete; all uses changed to cookie_read_function_t. (__io_write_fn): Delete; all uses changed to cookie_write_function_t. (__io_seek_fn): Delete; all uses changed to cookie_seek_function_t. (__io_close_fn): Delete: all uses changed to cookie_close_function_t. * libio/iofopncook.c: Remove unnecessary forward declarations. * libio/iolibio.h: Correct outdated commentary. * malloc/malloc.c (__malloc_stats): Remove unnecessary casts. * stdio-common/fxprintf.c (__fxprintf_nocancel): Remove unnecessary casts. * stdio-common/getline.c: Use _IO_getdelim directly. Don't redefine ssize_t. * stdio-common/printf_fp.c, stdio_common/printf_fphex.c * stdio-common/printf_size.c: Don't redefine size_t or FILE. Remove outdated comments. * stdio-common/vfscanf.c: Don't redefine va_list.
* Remove vestiges of external build support from libio headers.Zack Weinberg2018-02-211-0/+7
| | | | | | | | | | | | | | As requested by Adhemerval, this patch removes some preprocessor conditionals from the libio headers that were only relevant when building libio outside glibc. Installed stripped libraries and executables are unchanged by this patch. * libio/iolibio.h, libio/libioP.h: Remove extern "C". * libio/libio.h: Remove __BEGIN_DECLS and __END_DECLS. Remove preprocessor conditionals on _LIBC and __USE_GNU, which are always true, and __cplusplus, which is always false.
* Fix -Os putc_unlocked, fputc_unlocked linknamespace, localplt issues (bug ↵Joseph Myers2018-02-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 15105, bug 19463). Continuing the fixes for linknamespace and localplt test failures with -Os that arise from functions not being inlined in that case, this patch fixes such failures for putc_unlocked and fputc_unlocked. libc_hidden_* are used for both functions, while namespace issues are addressed by making putc_unlocked a weak alias of hidden __putc_unlocked, which is called in the one place where namespace issues arise (and defined as an inline function in include/stdio.h). Tested for x86_64 (both without -Os to make sure that case continues to work, and with -Os to make sure all the relevant linknamespace and localplt test failures are resolved). This completes fixing the -Os linknamespace failures (at least for x86_64); localplt failures remain after this patch. 2018-02-19 Joseph Myers <joseph@codesourcery.com> [BZ #15105] [BZ #19463] * libio/fputc_u.c (fputc_unlocked): Use libc_hidden_def. * libio/putc_u.c (putc_unlocked): Rename to __putc_unlocked and define as weak alias of __putc_unlocked. Use libc_hidden_weak. * include/stdio.h [!_ISOMAC] (fputc_unlocked): Use libc_hidden_proto. [!_ISOMAC] (putc_unlocked): Likewise. [!_ISOMAC] (__putc_unlocked): Declare as hidden function, and define inline if [__USE_EXTERN_INLINES]. * misc/syslog.c (__vsyslog_chk): Call __putc_unlocked instead of putc_unlocked.
* Fix -Os getc_unlocked linknamespace, localplt issues (bug 15105, bug 19463).Joseph Myers2018-02-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for linknamespace and localplt test failures with -Os that arise from functions not being inlined in that case, this patch fixes such failures for getc_unlocked. __getc_unlocked already exists; this patch makes it explicitly hidden, calls it where needed for namespace reasons, adds an inline function for it when inline functions are used and adds libc_hidden_proto / libc_hidden_weak for getc_unlocked. Tested for x86_64 (both without -Os to make sure that case continues to work, and with -Os to make sure all the relevant linknamespace and localplt test failures are resolved). Because of other such failures that remain after this patch, neither of the bugs can yet be closed. [BZ #15105] [BZ #19463] * libio/getc_u.c (getc_unlocked): Use libc_hidden_weak. * include/stdio.h [!_ISOMAC] (__getc_unlocked): Use attribute_hidden, and define inline if [__USE_EXTERN_INLINES]. [!_ISOMAC] (getc_unlocked): Use libc_hidden_proto. * misc/getttyent.c (__getttyent): Call __getc_unlocked instead of getc_unlocked. * time/tzfile.c (__tzfile_read): Likewise.
* Add missing “reorder-end” in LC_COLLATE of et_EE [BZ #22517]Mike FABIAN2018-02-211-0/+5
| | | | | [BZ #22517] * localedata/locales/et_EE (LC_COLLATE): add missing “reorder-end”
* Fix a typo in a comment.Rical Jasan2018-02-211-0/+4
| | | | * io/fcntl.h: Fix a typo in a comment.
* manual: Update _DEFAULT_SOURCE. [BZ #22862]Rical Jasan2018-02-211-0/+7
| | | | | | | | | | | | | | | | | The description of the interplay between feature test macros and compiler options in the description of _DEFAULT_SOURCE is a little confusing, and dated, so clarify the situation, and don't assume a specific value for _DEFAULT_SOURCE. Also, _DEFAULT_SOURCE is supposed to be defined if none of the C/POSIX feature test macros are defined, but the condition was lacking a test for _ISOC11_SOURCE, so that is also addressed. [BZ #22862] * include/features.h: Add _ISOC11_SOURCE to test for whether to define _DEFAULT_SOURCE. * manual/creature.texi (_DEFAULT_SOURCE): Improve documentation.
* ldconfig: Sync temporary files to disk before renaming them [BZ #20890]Florian Weimer2018-02-211-0/+8
| | | | | | | If the system crashes before the file data has been written to disk, the file system recovery upon the next mount may restore a partially rewritten temporary file under the non-temporary (final) name (after the rename operation).
* elf: Remove ad-hoc restrictions on dlopen callers [BZ #22787]Florian Weimer2018-02-211-0/+21
| | | | | | | | | | | | | | | | | | | | | | This looks like a post-exploitation hardening measure: If an attacker is able to redirect execution flow, they could use that to load a DSO which contains additional code (or perhaps make the stack executable). However, the checks are not in the correct place to be effective: If they are performed before the critical operation, an attacker with sufficient control over execution flow could simply jump directly to the code which performs the operation, bypassing the check. The check would have to be executed unconditionally after the operation and terminate the process in case a caller violation was detected. Furthermore, in _dl_check_caller, there was a fallback reading global writable data (GL(dl_rtld_map).l_map_start and GL(dl_rtld_map).l_text_end), which could conceivably be targeted by an attacker to disable the check, too. Other critical functions (such as system) remain completely unprotected, so the value of these additional checks does not appear that large. Therefore this commit removes this functionality.
* hurd: fix buildSamuel Thibault2018-02-211-0/+4
| | | | * sysdeps/mach/hurd/dl-sysdep.c (_dl_random): New variable.
* manual: Update the _ISOC99_SOURCE description.Rical Jasan2018-02-201-0/+5
| | | | | | | | 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.
* manual: Document missing feature test macros.Rical Jasan2018-02-201-0/+9
| | | | | | | | | | | | | | 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.
* Fix -Os ferror_unlocked linknamespace, localplt issues (bug 15105, bug 19463).Joseph Myers2018-02-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for linknamespace and localplt test failures with -Os that arise from functions not being inlined in that case, this patch fixes such failures for ferror_unlocked. The usual approach is followed of adding __ferror_unlocked (inlined when ferror_unlocked is), making calls use it when required for namespace reasons (only one such call), and using libc_hidden_proto / libc_hidden_weak for the ferror_unlocked weak alias when only localplt but not namespace issues are involved. Tested for x86_64 (both without -Os to make sure that case continues to work, and with -Os to make sure all the relevant linknamespace and localplt test failures are resolved). Because of other such failures that remain after this patch, neither of the bugs can yet be closed. [BZ #15105] [BZ #19463] * libio/ferror_u.c (ferror_unlocked): Rename to __ferror_unlocked and define as weak alias of __ferror_unlocked. Use libc_hidden_weak. * include/stdio.h [!_ISOMAC] (ferror_unlocked): Use libc_hidden_proto. [!_ISOMAC] (__ferror_unlocked) New declaration, and inline function if [__USE_EXTERN_INLINES]. * time/getdate.c (__getdate_r): Call __ferror_unlocked instead of ferror_unlocked.
* manual: Improve documentation of get_current_dir_name. [BZ #6889]Rical Jasan2018-02-191-0/+5
| | | | | | | | | | | 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.
* Fix posix/tst-glob_lstat_compat on alpha [BZ #22818]Aurelien Jarno2018-02-181-0/+6
| | | | | | | | | | | | | 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.
* intl/tst-gettext: fix failure with newest msgfmtAurelien Jarno2018-02-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since upstream gettext commit d13f165b83 (msgfmt: Remove POT-Creation-Date field from the header in the output.), msgfmt does not copy the POT-Creation-Date field in the header entry from the po file to the mo file anymore. This breaks the assumption that we can test gettext by comparing each message in the po files with the corresponding string return by gettext. This makes the intl/tst-gettext to fail. While it would have been possible to modify the po2test.awk script to also strip the line POT-Creation-Date field when creating the msgs.h file, it would not work with both the old and new msgfmt. Instead create a tst-gettext-de.po file from de.po by removing the POT-Creation-Date line. Another alternative would be to use a static tst-gettext-de.po file, but I guess the reason for using de.po is to also catch issues caused by newly added strings. As tst-catgets also uses msg.h, it should also be updated. Instead of using the new tst-gettext-de.po file, the patch modifies xopen-msg.awk to avoid creating a second catgets->intl dependency. Changelog: [BZ #21508] * catgets/xopen-msg.awk: Ignore POT-Creation-Date line. * intl/Makefile ($(objpfx)tst-gettext-de.po): Generate intl/tst-gettext-de.po from po/de.po by removing the POT-Creation-Date line. ($(objpfx)msgs.h): Depend on $(objpfx)tst-gettext-de.po instead of ../po/de.po. * intl/tst-gettext.sh: Use ${objpfx}tst-gettext-de.po instead of ../po/de.po.
* hurd: Fix build on missing __ptsname_internal functionSamuel Thibault2018-02-171-0/+4
| | | | | | | * sysdeps/mach/hurd/ptsname.c: Include <sys/stat.h>. (__ptsname_r): Move implementation to... (__ptsname_internal): ... new function. Add filling the STP structure.
* hurd: Define EXEC_PAGESIZESamuel Thibault2018-02-171-0/+6
| | | | | | * mach/Makefile (headers): Add mach/param.h. * sysdeps/mach/hurd/bits/param.h: Include <mach/param.h>. * sysdeps/mach/i386/mach/param.h: New file, defines EXEC_PAGESIZE
* Fix ulps for pow on hppa.John David Anglin2018-02-171-0/+5
| | | | | * sysdeps/hppa/fpu/libm-test-ulps (pow): Increase double and idouble to 1 ULP.
* manual: Fix a syntax error.Rical Jasan2018-02-161-0/+5
| | | | | | | | | | | | | 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.
* Add runtime check if mutex will be elided in tst-mutex8 testcases.Stefan Liebler2018-02-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | An elided mutex don't fail destroy. Elision was disabled for the test nptl/tst-mutex8 in nptl/Makefile. Thus we can run tests which destroy a locked mutex. As elision is only disabled for tst-mutex8, the variants tst-mutex8-static, tst-mutexpi8 and tst-mutexpi8-static are still failing if lock elision is enabled. This patch adds a runtime check, if the checked type of mutex will be elided. This check is using TUNABLE_GET_FULL to determine if elision is enabled via the tunables framework. The pthread_mutex_destroy tests are only run if we dont't assume an elided mutex. This way, we can run the whole glibc testsuite with or without enabled lock elision. ChangeLog: * nptl/Makefile (tst-mutex8-ENV): Delete. * nptl/tst-mutex8.c (check_type): Add runtime check if mutex will be elided.
* Document use of CC and CFLAGS in more detail (bug 20980, bug 21234).Joseph Myers2018-02-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some bug reports from people setting CFLAGS not including a -O option and then being confused when the build fails. This patch addresses this by documenting the proper use of CC and CFLAGS in more detail - saying what options should go where and specifying the requirement to compile with optimization. The previous text incorrectly used @var markup with CC and CFLAGS. The correct markup for environment variables is @env, but it's also the case that passing such variables explicitly on the configure command line is preferred to passing them in the environment, so this patch changes the documentation to describe passing them on the command line (and uses @code). In many cases putting options in the wrong place may in fact work, but I believe what I've specified is the correct rule for which options to put where. [BZ #20980] [BZ #21234] * manual/install.texi (Configuring and compiling): Describe passing CC and CFLAGS on configure command line, not as environment variables. Use @code markup on those variables. Specify what options go in CC and what go in CFLAGS. Note the requirement to compile with optimization. * INSTALL: Regenerated.
* Fix hppa local PLT entries for sigprocmask (bug 18124).Joseph Myers2018-02-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding/updating localplt.data for various architectures to get the compilation tests passing everywhere, I generally made it reflect the existing state of what local PLT entries were actually seen, rather than an ideal state with as few as possible such entries, mainly for functions that are intended to be interposable. This patch eliminates some local PLT entries for hppa by using __sigprocmask instead of sigprocmask in getcontext and setcontext. The specific case of sigprocmask called by setcontext is the third of four items in bug 18124 (the other three have already been fixed for 2.26 or earlier releases). Note that hppa-specific localplt.data entries for __sigsetjmp, _IO_funlockfile and __errno_location remain, but the causes / fixes are less immediately obvious from source inspection. Tested (compilation tests only) with build-many-glibcs.py for hppa-linux-gnu. [BZ #18124] * sysdeps/hppa/bsd-setjmp.S: Include <sysdep.h>. (setjmp): Use HIDDEN_JUMPTARGET with __sigsetjmp. * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Call __sigprocmask instead of sigprocmask. * sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): Likewise. * sysdeps/unix/sysv/linux/hppa/localplt.data: Remove entries for __sigsetjmp and sigprocmask.
* Use libc_hidden_* for argz_next, __argz_next (bug 15105).Joseph Myers2018-02-151-0/+6
| | | | | | | | | | | | | | | | | | Among other localplt test failures when building with -Os, there are libc.so PLT references for argz_next and __argz_next. This is a simple case of functions that are inlined for -O2 but not for -Os; this patch adds libc_hidden_proto / libc_hidden_def for them to avoid localplt failures even when not inlined. Tested for x86_64 (both that it removes these particular localplt failures for -Os - but other such failures remain so the bug can't yet be closed - and that the testsuite continues to pass without -Os). [BZ #15105] * include/argz.h (argz_next): Use libc_hidden_proto. (__argz_next): Likewise. * string-argz-next.c (__argz_next): Use libc_hidden_def. (argz_next): Use libc_hidden_weak.