about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* S390: Add configure check to detect z10 as mininum architecture level set.Stefan Liebler2018-12-184-0/+77
| | | | | | | | | | Add a configure check for z10 in the same way as done for z196. ChangeLog: * config.h.in (HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT): New undefine. * sysdeps/s390/configure.ac: Add check for z10 support. * sysdeps/s390/configure: Regenerated.
* x86: Merge i386/x86_64 atomic-machine.hH.J. Lu2018-12-183-621/+171
| | | | | | | | | | Merge i386 and x86_64 atomic-machine.h to x86 atomic-machine.h. Tested on i686 and x86_64 as well as with build-many-glibcs.py. * sysdeps/i386/atomic-machine.h: Merged with ... * sysdeps/x86_64/atomic-machine.h: To ... * sysdeps/x86/atomic-machine.h: This. New file.
* locale: Rewrite locale/gen-translit.pl in PythonFlorian Weimer2018-12-1810-2364/+1581
| | | | | | This commit does not change the generated output file. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* localedata: Remove executable bit from localedata/locales/bi_VU [BZ #23995]Florian Weimer2018-12-182-0/+5
|
* Fix __TIMERSIZE and @theglibcadj typosAlbert ARIBAUD (3ADEV)2018-12-182-2/+2
| | | | | | Fix following typos in parent commit: - ChangeLog: __TIMERSIZE should be __TIMESIZE - manual/maint.texi: @theglibcadj should be @glibcadj
* Y2038: add function __localtime64Albert ARIBAUD (3ADEV)2018-12-174-1/+157
| | | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__localtime64): Add. * manual/maint.texi: Document Y2038 symbol handling. * time/localtime.c (__localtime64): Add. [__TIMERSIZE != 64] (__localtime): Turn into a wrapper.
* Do not clobber r12 for ia64 syscalls.Joseph Myers2018-12-172-1/+4
| | | | | | | | | | | | | GCC mainline now gives errors for an asm that clobbers the stack pointer. According to <https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00932.html> GCC previously ignored such a clobber; thus, this patch removes it from the clobbers for ia64 syscalls. Tested with build-many-glibcs.py for ia64-linux-gnu. * sysdeps/unix/sysv/linux/ia64/sysdep.h (ASM_CLOBBERS_6_COMMON): Do not clobber r12.
* Add test that MAP_* constants agree with kernel.Joseph Myers2018-12-174-4/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the process of building up and using Python infrastructure for extracting and using values in headers, this patch adds a test that MAP_* constants from sys/mman.h agree with those in the Linux kernel headers. (Other sys/mman.h constants could be added to the test separately.) This set of constants has grown over time, so the generic code is enhanced to allow saying extra constants are OK on either side of the comparison (where the caller sets those parameters based on the Linux kernel headers version, compared with the version the headers were last updated from). Although the test is a custom Python file, my intention is to move in future to a single Python script for such tests and text files it takes as inputs, once there are enough examples to provide a guide to the common cases in such tests (I'd like to end up with most or all such sets of constants copied from kernel headers having such tests, and likewise for structure layouts from the kernel). The Makefile code is essentially the same as for tst-signal-numbers, but I didn't try to find an object file to depend on to represent the dependency on the headers used by the test (the conform/ tests don't try to represent such header dependencies at all, for example). Tested with build-many-glibcs.py, and also for x86_64 with older kernel headers. * scripts/glibcextract.py (compare_macro_consts): Take parameters to allow extra macros from first or second sources. * sysdeps/unix/sysv/linux/tst-mman-consts.py: New file. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (tests-special): Add $(objpfx)tst-mman-consts.out. ($(objpfx)tst-mman-consts.out): New makefile target.
* Add statx conditionals for wordsize-32 *xstat.cMao Han2018-12-1714-6/+186
| | | | | | | | | | | | | | | | | | | | | | | Linux kernel have remove stat64 family from default syscall set, new implementations with statx is needed when __ARCH_WANT_STAT64 is not define. This patch add conditionals for relevant functions, using statx system call to get information and then copy to the return buf, ref to include/linux/fs.h from linux kernel. * sysdeps/unix/sysv/linux/Makefile: Add statx_cp.c. * sysdeps/unix/sysv/linux/fxstat64.c: Add conditionals for kernel without stat64 system call support. * sysdeps/unix/sysv/linux/fxstatat64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/statx_cp.c: New file. * sysdeps/unix/sysv/linux/statx_cp.c: Likewise. * sysdeps/unix/sysv/linux/statx_cp.h: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/statx_cp.c: Likewise.
* regex: fix storage-exhaustion errorPaul Eggert2018-12-162-0/+9
| | | | | | [BZ #18040] * posix/regexec.c (get_subexp): Do not continue if storage is exhausted.
* regex: fix heap-use-after-free errorAssaf Gordon2018-12-162-0/+14
| | | | | | | | | | | | [BZ #18040] Problem reported by Saito Takaaki <tails.saito@gmail.com> in https://debbugs.gnu.org/32592 Call stack get_subexp->get_subexp_sub->clean_state_log_if_needed may call extend_buffers which reallocates the re_string_t internal buffer. Local variable 'buf' was not updated in such case, resulting in use-after-free. * posix/regexec.c (get_subexp): Update 'buf' after call to get_subexp_sub.
* support: Do not require overflow builtin in support/blob_repeat.cFlorian Weimer2018-12-152-3/+29
| | | | | | It is only available in GCC 5 and later. Tested-by: Romain Naour <romain.naour@gmail.com>
* Remove x86 mathinline.h asinh, acosh, atanh inlines.Joseph Myers2018-12-142-13/+7
| | | | | | | | | | | | | | | Continuing the removal of bits/mathinline.h inlines that would better be done by the compiler, this patch removes x86 inlines for asinh, acosh and atanh functions (only for fast-math, non-SSE 32-bit x86). I've filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88502> for adding such inlines as an optimization in GCC. Tested for x86_64 and x86. * sysdeps/x86/fpu/bits/mathinline.h (asinh): Remove inline definition. (acosh): Likewise. (atanh): Likewise.
* manual: Document thread/task IDs for LinuxFlorian Weimer2018-12-143-18/+56
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Add tests for the long double version of ecvt and fcvtGabriel F. T. Gomes2018-12-145-28/+128
| | | | | | | | | | The test case misc/tst-efgcvt.c only tests the double variants of the Old-fashioned System V number-to-string functions: ecvt, fcvt, and their re-entrant counterparts. With a few macros, the code can be reused for the long double versions of these functions. A future patch will reuse it again for IEEE long double on powerpc64le. Tested for powerpc and powerpc64le.
* Add missing libnss_testX.so requirement for tst-nss-test3.Stefan Liebler2018-12-142-1/+5
| | | | | | | | | | | | | | | Sometimes tst-nss-test3 fails with: error: test-container.c:386: unable to open .../nss/libnss_test1.so for reading The test tst-nss-test3 which runs in a container needs libnss_test[12].so. (see e.g. tst-nss-test3.script). Before this test was moved from tests to tests-container variable, the requirement was met. Thus this patch adds this requirement also for tests in tests-container. ChangeLog: * nss/Makefile (tst-nss-test3.out): New rule.
* Do not clobber sp in _hurd_stack_setup.Joseph Myers2018-12-132-1/+6
| | | | | | | | | | | | | GCC mainline now gives errors for an asm that clobbers the stack pointer. According to <https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00932.html> GCC previously ignored such a clobber; thus, this patch removes it from _hurd_stack_setup. Tested with build-many-glibcs.py for i686-gnu. * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Do not clobber sp.
* x86: Add Hygon Dhyana support.Carlos O'Donell2018-12-132-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix Hygon Dhyana processor CPU Vendor ID detection problem in glibc sysdep module, current glibc codes doesn't recognize Dhyana CPU Vendor ID("HygonGenuine") and set kind to arch_kind_other, which result to incorrect zero value for __cache_sysconf() syscall. As Hygon Dhyana share most architecture feature as AMD Family 17h, this patch add Hygon CPU Vendor ID check and setup kind to arch_kind_amd and reuse AMD code path, which lead to correct return value in __cache_sysconf() syscall. we run the glibc test suite for both Hygon Dhyana and AMD EPYC and found no failure case. Background: Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture between AMD and Haiguang Information Technology Co.,Ltd., aims at providing high performance x86 processor for China server market. Its first generation processor codename is Dhyana, which originates from AMD technology and shares most of the architecture with AMD's family 17h, but with different CPU Vendor ID("HygonGenuine")/Family series number(Family 18h). Related Hygon kernel patch can be found on http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn Signed-off-by: fanjinke <fanjinke@hygon.cn> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix rwlock stall with PREFER_WRITER_NONRECURSIVE_NP (bug 23861)Andreas Schwab2018-12-134-2/+95
| | | | | | | | | | In the read lock function (__pthread_rwlock_rdlock_full) there was a code path which would fail to reload __readers while waiting for PTHREAD_RWLOCK_RWAITING to change. This failure to reload __readers into a local value meant that various conditionals used the old value of __readers and with only two threads left it could result in an indefinite stall of one of the readers (waiting for PTHREAD_RWLOCK_RWAITING to go to zero, but it never would).
* Reindent nptl/pthread_rwlock_common.cAndreas Schwab2018-12-132-78/+84
|
* Remove x86 mathinline.h hypot inline.Joseph Myers2018-12-122-4/+5
| | | | | | | | | | | | | Continuing the removal of bits/mathinline.h inlines that would better be done by the compiler, this patch removes an x86 inline for hypot functions (only for fast-math, only for non-SSE 32-bit x86). I've filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88474> for adding such an inline as an optimization in GCC. Tested for x86_64 and x86. * sysdeps/x86/fpu/bits/mathinline.h (hypot): Remove inline definition.
* benchtests: send non-consumable data to stderrLeonardo Sandoval2018-12-122-3/+12
| | | | | | | | | | | Non-consumable data, alias data not related to benchmarks, should be sent to the standard error, thus pipelines can work as expected. * benchtests/scripts/compare_bench.py (do_compare): write to stderr in case stat is not present. * benchtests/scripts/compare_bench.py (plot_graphs): write to stderr in case timings field is not present. Also string showing the output filename goes into the stderr.
* benchtests: include --stats parameterLeonardo Sandoval2018-12-122-9/+27
| | | | | | | | | | | | | | Allows user to pick a statistic, defaulting to min and mean, from command line. At the same time, if stat does not exit, catch the run-time exception and keep comparing the rest of benchmarked functions. Finally, take care of division-by-zero exceptions and as the latter, keep comparing the rest of the functions, turning the script a bit more fault tolerant thus useful. * benchtests/scripts/compare_bench.py (do_compare): Catch KeyError and ZeroDivisorError exceptions. * benchtests/scripts/compare_bench.py (compare_runs): Use stats argument to loop through user provided statistics. * benchtests/scripts/compare_bench.py (main): Include the --stats argument.
* benchtests: keep comparing even if function timings do not matchLeonardo Sandoval2018-12-122-1/+6
| | | | | | | Allows other functions to be processed, making the script a bit more fault tolerant thus useful. * benchtests/scripts/compare_bench.py (compare_runs): Continue instead of return.
* timespec_get (posix): Fix copyright headerFlorian Weimer2018-12-122-1/+6
| | | | | | | The “any later version” clause was missing. This change was approved in principle by the FSF in RT ticket #1316403. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc: Add missing CFI register information (bug #23614)Tulio Magno Quites Machado Filho2018-12-124-18/+46
| | | | | | | | | | | | | | Add CFI information about the offset of registers stored in the stack frame. [BZ #23614] * sysdeps/powerpc/powerpc64/addmul_1.S (FUNC): Add CFI offset for registers saved in the stack frame. * sysdeps/powerpc/powerpc64/lshift.S (__mpn_lshift): Likewise. * sysdeps/powerpc/powerpc64/mul_1.S (__mpn_mul_1): Likewise. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
* Add *-ldbl.h headers to include/bitsGabriel F. T. Gomes2018-12-117-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms, long double may have either the same format as double or another, wider format, such as the Quadruple IEC 60559 long double format or the IBM Extended Precision format (both 128-bits wide). Selecting between the available formats is done by using one of the following compiler switches: -mlong-double-128, for the wider format, or -mlong-double-64, for the narrower. On all platforms that provide this choice, the wider format is the default. When the non-default format is selected by user code (i.e.: when building with -mlong-double-64) calls to functions that take long double parameters or return a long double type (e.g.: strfroml) are redirected to a compat function, via assembler redirection, by headers such as bits/stdlib-ldbl.h or bits/misc-ldbl.h. In glibc builds, however, these headers are currently being read from the system directories (/usr/include/bits) rather than from the source directory. Although this works correctly today, it raises reproducibility concerns. Besides that, builds for powerpc64le will need these files from the source directory, because on powerpc64le, the new redirections for long double with IEEE binary128 format will be implemented in these headers. Tested for powerpc64 and powerpc64le.
* Remove redirection of _IO_vfprintfGabriel F. T. Gomes2018-12-112-1/+4
| | | | | | | | | | | | | | | | | Since the commit commit 698fb75b9ff5ae454a1344b5f9fafa0ca367c555 Author: Zack Weinberg <zackw@panix.com> Date: Wed Mar 7 14:32:01 2018 -0500 Add __v*printf_internal with flags arguments _IO_vfprintf is gone. This did not trigger any test case failures on powerpc and powerpc64le, because there were no tests that covered it. However, new test cases for nldbl versions of argp.h functions exposed the problem. Tested for powerpc64 and powerpc64le.
* Remove support for abilist-patternAndreas Schwab2018-12-112-53/+9
|
* Fix powf overflow handling in non-nearest rounding mode [BZ #23961]Szabolcs Nagy2018-12-114-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | The threshold value at which powf overflows depends on the rounding mode and the current check did not take this into account. So when the result was rounded away from zero it could become infinity without setting errno to ERANGE. Example: pow(0x1.7ac7cp+5, 23) is 0x1.fffffep+127 + 0.1633ulp If the result goes above 0x1.fffffep+127 + 0.5ulp then errno is set, which is fine in nearest rounding mode, but powf(0x1.7ac7cp+5, 23) is inf in upward rounding mode powf(-0x1.7ac7cp+5, 23) is -inf in downward rounding mode and the previous implementation did not set errno in these cases. The fix tries to avoid affecting the common code path or calling a function that may introduce a stack frame, so float arithmetics is used to check the rounding mode and the threshold is selected accordingly. [BZ #23961] * math/auto-libm-test-in: Add new test case. * math/auto-libm-test-out-pow: Regenerated. * sysdeps/ieee754/flt-32/e_powf.c (__powf): Fix overflow check.
* test-container: move postclean outside of namespace changesDJ Delorie2018-12-102-8/+43
| | | | | | | | | | | | | | | | | | | | During postclean.req testing it was found that the fork in the parent process (after the unshare syscall) would fail with ENOMEM (see recursive_remove() in test-container.c). While failing with ENOMEM is certainly unexpected, it is simply easier to refactor the design and have the parent remain outside of the namespace. This change moves the postclean.req processing to a distinct process (the parent) that then forks the test process (which will have to fork once more to complete uid/gid transitions). When the test process exists the cleanup process will ensure all files are deleted when a post clean is requested. Signed-off-by: DJ Delorie <dj@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23948] * support/test-container.c: Move postclean step to before we change namespaces.
* Use gen-as-const.py to process .pysym files.Joseph Myers2018-12-106-150/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
* Move tst-signal-numbers to Python.Joseph Myers2018-12-106-147/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the tst-signal-numbers test from shell + awk to Python. As with gen-as-const, the point is not so much that shell and awk are problematic for this code, as that it's useful to build up general infrastructure in Python for use of a range of code involving extracting values from C headers. This patch moves some code from gen-as-const.py to a new glibcextract.py, which also gains functions relating to listing macros, and comparing the values of a set of macros from compiling two different pieces of code. It's not just signal numbers that should have such tests; pretty much any case where glibc copies constants from Linux kernel headers should have such tests that the values and sets of constants agree except where differences are known to be OK. Much the same also applies to structure layouts (although testing those without hardcoding lists of fields to test will be more complicated). Given this patch, another test for a set of macros would essentially be just a call to glibcextract.compare_macro_consts (plus boilerplate code - and we could move to having separate text files defining such tests, like the .sym inputs to gen-as-const, so that only a single Python script is needed for most such tests). Some such tests would of course need new features, e.g. where the set of macros changes in new kernel versions (so you need to allow new macro names on the kernel side if the kernel headers are newer than the version known to glibc, and extra macros on the glibc side if the kernel headers are older). tst-syscall-list.sh could become a Python script that uses common code to generate lists of macros but does other things with its own custom logic. There are a few differences from the existing shell + awk test. Because the new test evaluates constants using the compiler, no special handling is needed any more for one signal name being defined to another. Because asm/signal.h now needs to pass through the compiler, not just the preprocessor, stddef.h is included as well (given the asm/signal.h issue that it requires an externally provided definition of size_t). The previous code defined __ASSEMBLER__ with asm/signal.h; this is removed (__ASSEMBLY__, a different macro, eliminates the requirement for stddef.h on some but not all architectures). Tested for x86_64, and with build-many-glibcs.py. * scripts/glibcextract.py: New file. * scripts/gen-as-const.py: Do not import os.path, re, subprocess or tempfile. Import glibcexctract. (compute_c_consts): Remove. Moved to glibcextract.py. (gen_test): Update reference to compute_c_consts. (main): Likewise. * sysdeps/unix/sysv/linux/tst-signal-numbers.py: New file. * sysdeps/unix/sysv/linux/tst-signal-numbers.sh: Remove. * sysdeps/unix/sysv/linux/Makefile ($(objpfx)tst-signal-numbers.out): Use tst-signal-numbers.py. Redirect stderr as well as stdout.
* Enable VDSO for static linking on mipsRafael Ávila de Espíndola2018-12-106-10/+25
| | | | | | | | | | | | | | | | | I have tested that this builds and the resulting program still work. This was tested on gcc23.fsffrance.org, and for some reason the vdso there seems unused even when using shared libraries. [BZ #19767] * sysdeps/unix/sysv/linux/mips/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/mips/libc-vdso.h: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Define ALWAYS_USE_VSYSCALL.
* compat getdents64: Use correct offset for retry [BZ #23972]Florian Weimer2018-12-103-3/+27
| | | | | d_off is the offset of the *next* entry, not the offset of the current entry.
* Move *-le.abilist to le/*.abilistAndreas Schwab2018-12-1028-4/+8
| | | | | Now that powerpc is using separate sysdep dirs for BE vs LE ABI, there is no need for abilist-pattern any more.
* Update timezone code from tzcode 2018g.Joseph Myers2018-12-106-337/+607
| | | | | | | | | | | | | This patch updates files coming from tzcode to the versions in tzcode 2018g. No changes elsewhere in glibc were needed. Tested for x86_64. * timezone/private.h: Update from tzcode 2018g. * timezone/tzfile.h: Likewise. * timezone/tzselect.ksh: Likewise. * timezone/zdump.c: Likewise. * timezone/zic.c: Likewise.
* Fix potential stack overflow [BZ #23490]Paul Pluzhnikov2018-12-082-2/+8
| | | | | Since we are expecting the exact "IBT" string, adjust stack buffer size and scanf format accordingly.
* malloc: Add another test for tcache double free check.DJ Delorie2018-12-073-1/+63
| | | | | | | | | | This one tests for BZ#23907 where the double free test didn't check the tcache bin bounds before dereferencing the bin. [BZ #23907] * malloc/tst-tcfree3.c: New. * malloc/Makefile: Add it.
* Don't use __typeof__ (getcpu)H.J. Lu2018-12-072-1/+7
| | | | | | | | | We can't use "__typeof__ (getcpu)" since getcpu is Linux specific and Hurd doesn't have it. Tested with build-many-glibcs.py. * include/sched.h (__getcpu): Don't use __typeof__ (getcpu).
* Prepare vfscanf to use __strtof128_internalGabriel F. T. Gomes2018-12-073-3/+41
| | | | | | | | | | | | | | | | | | | | | On powerpc64le, long double can currently take two formats: the same as double (-mlong-double-64) or IBM Extended Precision (default with -mlong-double-128 or explicitly with -mabi=ibmlongdouble). The internal implementation of scanf-like functions is aware of these possibilites and, based on the format in use, properly calls __strtold_internal or __strtod_internal, saving the return to a variable of type double or long double. When library support for TS 18661-3 was added to glibc, a new function, __strtof128_internal, was added to enable reading of floating-point values with IEEE binary128 format into the _Float128 type. Now that powerpc64le is getting support for its third long double format, and taking into account that this format is the same as the format of _Float128, this patch extends __vfscanf_internal and __vfwscanf_internal to call __strtof128_internal or __wcstof128_internal when appropriate. The result gets saved into a variable of _Float128 type. Tested for powerpc64le.
* hurd: Fix linknamespace of spawniSamuel Thibault2018-12-074-3/+16
| | | | | | | | | * include/unistd.h (__confstr): Add prototype and hidden prototype. * posix/confstr.c (confstr): Rename to __confstr. (__confstr): Add hidden def. (confstr): Add weak alias for __confstr. * sysdeps/mach/hurd/spawni.c (__spawni): Call __confstr instead of confstr.
* Add getcpuH.J. Lu2018-12-0735-1/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add #include <sched.h> int getcpu (unsigned int *cpu, unsigned int *node); to return currently used CPU and NUMA node. Tested on x86-64, x32 and i686 as well as with build-many-glibcs.py. * NEWS: Mention getcpu. * include/sched.h (__getcpu): New libc_hidden_proto. * manual/resource.texi: Document getcpu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add getcpu. * sysdeps/unix/sysv/linux/Versions (GLIBC_2.29): Add getcpu. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add getcpu. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h (getcpu): New prototype. * sysdeps/unix/sysv/linux/getcpu.c: New file. * sysdeps/unix/sysv/linux/tst-skeleton-affinity.c (test_size): Also check getcpu.
* hurd: Implement support for posix_spawn_file_actions_addfchdir_npSamuel Thibault2018-12-072-0/+50
|
* posix: New function posix_spawn_file_actions_addfchdir_np [BZ #17405]Florian Weimer2018-12-0738-99/+291
| | | | | | Along with posix_spawn_file_actions_addchdir, posix_spawn_file_actions_addfchdir is the subject of a change proposal for POSIX: <http://austingroupbugs.net/view.php?id=1208>
* Update miscellaneous files from upstream sources.Joseph Myers2018-12-067-21/+86
| | | | | | | | | | | | | | | This patch updates various miscellaneous files from their upstream sources. Tested for x86_64, including "make pdf". * manual/texinfo.tex: Update to version 2018-09-21.20 with trailing whitespace removed. * scripts/config.guess: Update to version 2018-11-28. * scripts/config.sub: Update to version 2018-11-28. * scripts/install-sh: Update to version 2018-03-11.20. * scripts/mkinstalldirs: Update to version 2018-03-07.03. * scripts/move-if-change: Update to version 2018-03-07 03:47.
* inet/tst-if_index-long: New test case for CVE-2018-19591 [BZ #23927]Florian Weimer2018-12-063-1/+69
|
* support: Implement <support/descriptors.h> to track file descriptorsFlorian Weimer2018-12-067-0/+544
|
* Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl.Zack Weinberg2018-12-056-280/+280
| | | | | | | | | After all that prep work, nldbl-compat.c can now use PRINTF_LDBL_IS_DBL instead of __no_long_double to control the behavior of printf-like functions; this is the last thing we needed __no_long_double for, so it can go away entirely. Tested for powerpc and powerpc64le.
* Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319)Zack Weinberg2018-12-0535-551/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _chk variants of all of the printf functions become much simpler. This is the last thing that we needed _IO_acquire_lock_clear_flags2 for, so it can go as well. I took the opportunity to make the headers included and the names of all local variables consistent across all the affected files. Since we ultimately want to get rid of __no_long_double as well, it must be possible to get all of the nontrivial effects of the _chk functions by calling the _internal functions with appropriate flags. For most of the __(v)xprintf_chk functions, this is covered by PRINTF_FORTIFY plus some up-front argument checks that can be duplicated. However, __(v)sprintf_chk installs a custom jump table so that it can crash instead of overflowing the output buffer. This functionality is moved to __vsprintf_internal, which now has a 'maxlen' argument like __vsnprintf_internal; to get the unsafe behavior of ordinary (v)sprintf, pass -1 for that argument. obstack_printf_chk and obstack_vprintf_chk are no longer in the same file. As a side-effect of the unification of both fortified and non-fortified vdprintf initialization, this patch fixes bug 11319 for __dprintf_chk and __vdprintf_chk, which was previously fixed only for dprintf and vdprintf by the commit commit 7ca890b88e6ab7624afb1742a9fffb37ad5b3fc3 Author: Ulrich Drepper <drepper@redhat.com> Date: Wed Feb 24 16:07:57 2010 -0800 Fix reporting of I/O errors in *dprintf functions. This patch adds a test case to avoid regressions. Tested for powerpc and powerpc64le.