about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Ensure mktime sets errno on error [BZ #23789] aaribaud/bugzilla/23789/v4Albert ARIBAUD (3ADEV)2018-11-024-6/+47
| | | | | | | | | | | | | | | | | | Posix mandates that mktime set errno to EOVERFLOW on error, but the glibc mktime wasn't doing it so far. Fix this and add a test to prevent regressions. The fix also fixes the same issue in timegm. Tested with 'make check' on x86-linux-gnu and i686-linux-gnu. * time/Makefile: Add bug-mktime4. * time/bug-mktime4.c: New file. * time/mktime.c (__mktime_internal): Set errno to EOVERFLOW on error. (mktime): Move call to __tzset inside conditional.
* Fix typo in the documentation of gcvtGabriel F. T. Gomes2018-11-011-1/+1
| | | | | | | In the description of gcvt, add missing closing parenthesis in the comparison with sprintf. * manual/arith.texi (gcvt): Add missing closing parenthesis.
* soft-fp: Add implementation for 128 bit self-containedZong Li2018-11-012-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here only add the implementation when building the RV32 port. These macros are used when the following situations occur at the same time: soft-fp fma, ldbl-128 and 32-bit _FP_W_TYPE_SIZE. The RISC-V 32-bit port is the first port which use all three together. This is the building flow about the situation: When building soft-fp/s_fmal.c, there uses the FP_FMA_Q in __fmal. The _FP_W_TYPE_SIZE is defined to 32-bit in sysdeps/riscv/sfp-machine.h, so the FP_FMA_Q was defined to _FP_FMA (Q, 4, 8, R, X, Y, Z) in soft-fp/quad.h. Something in the soft-fp/quad.h: #if _FP_W_TYPE_SIZE < 64 # define FP_FMA_Q(R, X, Y, Z) _FP_FMA (Q, 4, 8, R, X, Y, Z) #else # define FP_FMA_Q(R, X, Y, Z) _FP_FMA (Q, 2, 4, R, X, Y, Z) #endif Finally, in _FP_FMA (fs, wc, dwc, R, X, Y, Z), it will use the _FP_FRAC_HIGHBIT_DW_##dwc macro, and it will be expanded to _FP_FRAC_HIGHBIT_DW_8, but the _FP_FRAC_HIGHBIT_DW_8 is not be implemented in soft-fp/op-8.h. there is only _FP_FRAC_HIGHBIT_DW_1, _FP_FRAC_HIGHBIT_DW_2 and _FP_FRAC_HIGHBIT_DW_4 in the soft-fp/op-*.h. After this modification, we can pass the soft floating testing of glibc testsuites on RV32. * soft-fp/op-8.h (_FP_FRAC_SET_8, _FP_FRAC_ADD_8, _FP_FRAC_SUB_8) (_FP_FRAC_CLZ_8, _FP_MINFRAC_8, _FP_FRAC_NEGP_8, _FP_FRAC_ZEROP_8) (_FP_FRAC_HIGHBIT_DW_8, _FP_FRAC_COPY_4_8, _FP_FRAC_COPY_8_4) (__FP_FRAC_SET_8): Add implementation for RV32 use.
* soft-fp: Use temporary variable in FP_FRAC_SUB_3/FP_FRAC_SUB_4Zong Li2018-11-012-28/+40
| | | | | | | | | | | | | | | | | | | | | | | | | In FRAC_SUB_3(R, X, Y) and FRAC_SUB_4(R,, X, Y), it reference both the X[N] and X[N] after R[N] have been set. If one of the X and Y is the same address with R, the result of the calculation is wrong, because the value of the original X and Y are overwritten. In glibc, there are two places use FRAC_SUB and occurs the overlap. The first is _FP_DIV_MEAT_N_loop in op-common.h, it uses the source _FP_DIV_MEAT_N_loop_u as the destination. This macro only be used when N is one(_FP_DIV_MEAT_1_loop) and then the _FP_FRAC_SUB_##wc extend to _FP_FRAC_SUB_1 in this macro. so it also work because _FP_FRAC_SUB_1 has no overlap problem in its implementation. The second places is _FP_DIV_MEAT_4_udiv, the original value of X##_f[0] is overwritten before the calculatation. In FRAC_SUB_1 and FRAC_SUB_2, there don't refer the source after destination have been set, so they have no problem. After this modification, we can pass the soft floating testing of glibc testsuites on RV32. * soft-fp/op-4.h (_FP_FRAC_SUB_3, _FP_FRAC_SUB_4): Use temporary variable to avoid overlap arguments.
* Avoid printf ("%s", NULL) in posix/bug-regex22.c.Joseph Myers2018-11-012-4/+8
| | | | | | | | | | | | | | | | | | | | | | Building posix/bug-regex22.c fails with GCC mainline because of -Wformat-overflow= warnings for NULL arguments to %s formats. This is *not* testing how glibc handles such format arguments; in the context of the messages in question it makes no sense to pass NULL to such a %s format (the code passes s, inside "if (s == NULL)"). So this patch changes the code not to pass such a format argument at all (which means the string passed is constant, so no need to use printf at all - however, there are two separate tests here with different length arguments passed to re_compile_pattern, so it *does* make sense to make the strings used different so that in the event of failure it's clear which one of the tests failed). Tested with build-many-glibcs.py with GCC mainline for aarch64-linux-gnu. * posix/bug-regex22.c (main): Use puts with distinct error messages for unexpected success of re_compile_pattern, not printf with NULL argument to %s.
* Disable -Wformat-overflow= warnings for some printf tests.Joseph Myers2018-11-013-0/+35
| | | | | | | | | | | | | | | | | | Recent GCC -Wformat-overflow= changes result in some printf tests failing to build, because those tests are deliberately testing the handling of formats writing more than INT_MAX characters and the handling of NULL arguments to the %s format, which GCC now warns about. This patch duly disables -Wformat-overflow= for the relevant calls to printf functions. Tested with build-many-glibcs.py with GCC mainline for aarch64-linux-gnu. * stdio-common/bug22.c: Include <libc-diag.h>. (do_test): Disable -Wformat-overflow= warnings around fprintf calls outputting more than INT_MAX characters. * stdio-common/tst-printf.c: Disable -Wformat-overflow= warnings around printf call with NULL %s argument.
* Update and correct SPARC configuration for supported socket syscalls (bug ↵Joseph Myers2018-11-013-4/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 23848). Looking at kernel-features.h files, I saw that SPARC was missing full information on when it gained separate socket syscalls. This patch adds such information to the SPARC kernel-features.h. It also corrects what appear to be bugs in the existing code (that would cause syscalls to be assumed to be present when not actually present). Various __ASSUME_* macros, defined by default, were not undefined for 32-bit despite those syscalls only being added for 32-bit in Linux 4.4. Some syscalls were used in the SPARC64 syscalls.list but only added in 4.4; this was harmless before the __NR_* macros were defined at all, but once the macros were defined it means a build with post-4.4 headers would assume the syscalls to be present regardless of --enable-kernel version. Then, various __ASSUME_* macros were previously not defined in cases where they could be defined (this part of the patch is just an optimization, not a bug fix). Note the observation in a comment in the patch that even the latest Linux kernel for SPARC does not have getpeername and getsockname syscalls in the compat syscall table for 32-bit binaries on 64-bit kernels (so glibc can't assume those syscalls to be present for 32-bit at all, although the 32-bit syscall table gained them in 4.4). Tested (compilation only) for SPARC with build-many-glibcs.py. [BZ #23848] * sysdeps/unix/sysv/linux/sparc/kernel-features.h [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_SENDMSG_SYSCALL): Undefine. [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_RECVMSG_SYSCALL): Likewise. [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_SENDTO_SYSCALL): Likewise. [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_ACCEPT_SYSCALL): Undefine under this condition, not just [!__arch64__]. [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_CONNECT_SYSCALL): Likewise. [!__arch64__ && __LINUX_KERNEL_VERSION < 0x040400] (__ASSUME_RECVFROM_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_BIND_SYSCALL): Define. [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_LISTEN_SYSCALL): Likewise. [__LINUX_KERNEL_VERSION >= 0x040400] (__ASSUME_SETSOCKOPT_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind): Remove. (listen): Likewise. (setsockopt): Likewise.
* MIPS: Use `.set mips2' to emulate LL/SC for the R5900 tooFredrik Noring2018-11-012-1/+7
| | | | | | | | | | | | | | | | | | | GAS treats the R5900 as MIPS III, with some modifications. The MIPS III designation means that the GNU C Library will try to assemble the LL and SC instructions, even though they are not implemented in the R5900. GAS will therefore produce the following errors: Error: opcode not supported on this processor: r5900 (mips3) `ll $2,0($4)' Error: opcode not supported on this processor: r5900 (mips3) `sc $6,0($4)' The MIPS II ISA override as used here enables the kernel to trap and emulate the LL and SC instructions, as required. This change has been tested by compiling the GNU C Library 2.27 with a GCC 8.2.0 cross-compiler for mipsr5900el-unknown-linux-gnu under Gentoo. * sysdeps/mips/sys/tas.h (_test_and_set): Handle the R5900 CPU with the ISA override.
* hurd: Add pci RPC stubsSamuel Thibault2018-10-312-1/+2
| | | | * hurd/Makefile (user-interfaces): Add pci.
* Simplify an #if #else #endifRafael Avila de Espindola2018-10-312-19/+15
| | | | | | | | | The #else of two nested #if clauses were identical. * sysdeps/unix/sysv/linux/sysdep-vdso.h: Simplify an #if #else #endif. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* Merge branch 'master' into errnoSamuel Thibault2018-10-310-0/+0
|\
| * Merge branch 'master' of git://sourceware.org/git/glibcSamuel Thibault2018-10-3126-336/+834
| |\
| * | hurd: Fix cancellation just before RPC callSamuel Thibault2018-10-283-10/+12
| | | | | | | | | | | | | | | | | | | | | * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Set intr_port to 0 when canceled. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Pass intr_port address.
| * | hurd: Fix race between calling RPC and handling a signalSamuel Thibault2018-10-284-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Make _hurd_intr_rpc_msg_about_to global point to start of controlled assembly snippet. Make it check canceled flag again. * hurd/hurdsig.c (_hurdsig_abort_rpcs): Only mutate thread if it passed the _hurd_intr_rpc_msg_about_to point. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Remove comment on mutation issue.
* | | hurd: Fix errno* generationSamuel Thibault2018-10-314-2/+28
| |/ |/| | | | | | | | | | | | | * sysdeps/mach/hurd/errnos.awk: Avoid printing errnos.d. * sysdeps/gnu/errlist.c (EIEIO): Move text to... * manual/errno.texi (EIEIO): ... here. * sysdeps/gnu/errlist.c (EIEIO): Regenerate. * sysdeps/mach/hurd/bits/errno.h: Regenerate.
* | hurd: Fix buildSamuel Thibault2018-10-311-2/+2
| | | | | | | | * sysdeps/gnu/errlist.c (EIEIO): Fix comment marker.
* | hurd: Document how to translate EIEIO error messageSamuel Thibault2018-10-312-0/+18
| | | | | | | | | | * sysdeps/gnu/errlist.c (EIEIO): Document how translators should translate the error message.
* | Convert linknamespace tests from Perl to Python.Joseph Myers2018-10-304-240/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces conform/linknamespace.pl with a new conform/linknamespace.py, so continuing the consolidation on Python instead of Perl for miscellaneous scripts used in building and testing glibc. The new script follows the same logic as the old one; as a recently-added script, there were no major cleanups to be made in the course of the language conversion. Tested for x86_64, and with build-many-glibcs.py. For x86_64 I also tested that if the Perl and Python scripts were made to print all the symbols in seen_where and the paths of symbol references by which those symbols were linked in, even when those symbols were OK, identical symbol lists appeared in the output with both versions of the script (the differences in linknamespace.out files were only in paths to temporary files in diagnostics for e.g. deprecated functions, and error output for the expected compilation failures when testing ndbm.h and varargs.h). * conform/linknamespace.py: New file. * conform/linknamespace.pl: Remove file. * conform/Makefile ($(linknamespace-header-tests)): Use linknamespace.py instead of linknamespace.pl. Do not use --tmpdir option.
* | stdlib/test-bz22786: Avoid memory leaks in the test itselfFlorian Weimer2018-10-302-2/+9
| |
* | support_blob_repeat: Call mkstemp directory for the backing fileFlorian Weimer2018-10-302-5/+13
| | | | | | | | This avoids a warning during post-test cleanup.
* | stdlib/tst-strtod-overflow: Switch to support_blob_repeatFlorian Weimer2018-10-302-6/+15
| | | | | | | | This is another test with an avoidable large memory allocation.
* | stdlib/test-bz22786: Avoid spurious test failures using alias mappingsFlorian Weimer2018-10-306-10/+426
| | | | | | | | | | | | | | | | On systems without enough random-access memory, stdlib/test-bz22786 will go deeply into swap and time out, even with a substantial TIMEOUTFACTOR. This commit adds a facility to construct repeating strings with alias mappings, so that the requirement for physical memory, and uses it in stdlib/test-bz22786.
* | RISC-V: properly terminate call chain (bug 23125)Andreas Schwab2018-10-304-2/+56
| | | | | | | | | | | | Mark the ra register as undefined in _start, so that unwinding through main works correctly. Also, don't use a tail call so that ra points after the call to __libc_start_main, not after the previous call.
* | Currency symbol should not preceed amount for [BZ #23791]Sergi Almacellas Abellana2018-10-292-3/+10
| | | | | | | | | | | | | | | | CLDR also has the currency symbol after the amount for Catalan. Also set grouping in LC_NUMERIC to 3;3. Reviewed-by: Mike FABIAN <mfabian@redhat.com>
* | hurd: return EIEIO instead of EIOSamuel Thibault2018-10-292-3/+3
| | | | | | | | | | | | | | EIO would be understood as hardware failure, while this is software failure. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Return EIEIO instead of EIO
* | Use tempfile.TemporaryDirectory in conform/glibcconform.py.Joseph Myers2018-10-292-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we require Python 3.4 or later, Python code creating temporary directories can use tempfile.TemporaryDirectory in "with" to have the directory deleted automatically instead of needing to use try/finally to handle removing a directory created with tempfile.mkdtemp. This patch does so in conform/glibcconform.py. Tested for x86_64. * conform/glibcconform.py: Do not import shutil. (list_exported_functions): Use tempfile.TemporaryDirectory instead of mkdtemp.
* | Patch to require Python 3.4 or later to build glibc.Joseph Myers2018-10-2911-61/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes Python 3.4 or later a required tool for building glibc, so allowing changes of awk, perl etc. code used in the build and test to Python code without any such changes needing makefile conditionals or to handle older Python versions. This patch makes the configure test for Python check the version and give an error if Python is missing or too old, and removes makefile conditionals that are no longer needed. It does not itself convert any code from another language to Python, and does not remove any compatibility with older Python versions from existing scripts. Tested for x86_64. * configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set critic_missing for versions before 3.4. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document requirement for Python to build glibc. * INSTALL: Regenerated. * Rules [PYTHON]: Make code unconditional. * benchtests/Makefile [PYTHON]: Likewise. * conform/Makefile [PYTHON]: Likewise. * manual/Makefile [PYTHON]: Likewise. * math/Makefile [PYTHON]: Likewise.
* | hurd: Fix race between calling RPC and handling a signalSamuel Thibault2018-10-284-23/+28
|/ | | | | | | | | | * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Make _hurd_intr_rpc_msg_about_to global point to start of controlled assembly snippet. Make it check canceled flag. * hurd/hurdsig.c (_hurdsig_abort_rpcs): Only mutate thread if it passed the _hurd_intr_rpc_msg_about_to point. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Remove comment on mutation issue, remove cancel flag check.
* hurd: Return EIO on non-responding interrupted serversSamuel Thibault2018-10-282-5/+11
| | | | | | | | | since we do not actually know whether the RPC was completed or not, which makes a huge difference for e.g. write(), so better really error out than letting caller think that the RPC did not happen. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): When the server does not answer to interrupt_operation, return EIO instead of EINTR.
* hurd: set interrupt timeout to 1 minuteSamuel Thibault2018-10-282-1/+5
| | | | | | | | Seeing a server not able to get interrupted for 3s is not so surprising when e.g. a lot of writes are happening. 1 minute allows to actually notice the issue and be able to debug it. * hurd/hurdsig.c (_hurd_interrupted_rpc_timeout): Set to 60000.
* Remove pre-Python-3.4 compatibility from build-many-glibcs.py.Joseph Myers2018-10-262-11/+5
| | | | | | | | | | | | | | | | | | | Since we have consensus on requiring Python 3.4 or later to build glibc, it follows that compatibility with older Python versions is also no longer relevant to auxiliary Python scripts for use in glibc development. This patch removes such compatibility code from build-many-glibcs.py (compatibility code needed for 3.4, which lacks the newer subprocess interface, is kept). Because build-many-glibcs.py is not itself called from the glibc build system, this patch is independent of the configure checks for having a new-enough Python version, which are only relevant to uses of Python from the main build and test process. Tested with build-many-glibcs.py building glibc for aarch64-linux-gnu (with Python 3.4 to make sure that still works). * scripts/build-many-glibcs.py: Remove compatibility for missing os.cpu_count and re.fullmatch.
* i64: fix missing exp2f, log2f and powf symbols in libm.a [BZ #23822]Szabolcs Nagy2018-10-264-9/+16
| | | | | | | | | | | | | | | | | | | | | When new symbol versions were introduced without SVID compatible error handling the exp2f, log2f and powf symbols were accidentally removed from the ia64 lim.a. The regression was introduced by the commits f5f0f5265162fe6f4f238abcd3086985f7c38d6d New expf and exp2f version without SVID compat wrapper 72d3d281080be9f674982067d72874fd6cdb4b64 New symbol version for logf, log2f and powf without SVID compat With WEAK_LIBM_ENTRY(foo), there is a hidden __foo and weak foo symbol definition in both SHARED and !SHARED build. [BZ #23822] * sysdeps/ia64/fpu/e_exp2f.S (exp2f): Use WEAK_LIBM_ENTRY. * sysdeps/ia64/fpu/e_log2f.S (log2f): Likewise. * sysdeps/ia64/fpu/e_exp2f.S (powf): Likewise.
* Add IN_MASK_CREATE from Linux 4.19 to sys/inotify.h.Joseph Myers2018-10-252-0/+6
| | | | | | | | | | This patch adds the IN_MASK_CREATE macro from Linux 4.19 to sys/inotify.h. Tested for x86_64. * sysdeps/unix/sysv/linux/sys/inotify.h (IN_MASK_CREATE): New macro.
* conform: XFAIL siginfo_t si_band test on sparc64Florian Weimer2018-10-255-3/+28
| | | | | We can use long int on sparcv9, but on sparc64, we must match the int type used by the kernel (and not long int, as in POSIX).
* Add new ELF note types from Linux 4.19 to elf.h.Joseph Myers2018-10-252-0/+7
| | | | | | | | | | This patch adds NT_MIPS_DSP and NT_MIPS_FP_MODE from Linux 4.19 to elf.h. Tested for x86_64. * elf/elf.h (NT_MIPS_DSP): New macro. (NT_MIPS_FP_MODE): Likewise.
* elf: Fix the ld flags not be applied to tst-execstack-mod.soZong Li2018-10-252-1/+6
| | | | | | The Makefile variable name lacked the file extension (.so). As a result, tst-execstack-mod.so was not linked with the -z execstack flag.
* hurd: XFAIL absence of C11 threads implementationSamuel Thibault2018-10-252-0/+10
| | | | | | * sysdeps/mach/hurd/i386/Makefile [$(subdir) = conform] (test-xfail-ISO11/threads.h/linknamespace, test-xfail-ISO11/threads.h/conform): Add.
* Use gen-libm-test.py to generate ulps table for manual.Joseph Myers2018-10-247-216/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends gen-libm-test.py to generate the ulps table for the manual, so meaning there is only a single ulps file parser needed and another Perl script is eliminated. As with the introduction of gen-libm-test.py, this is designed to generate exactly the same libm-err.texi as libm-err-tab.pl did. (gen-libm-test.py is still shorter in lines than the old gen-libm-test.pl even after this patch.) Note that this introduces a Python dependency for building the manual, which is thus noted in install.texi and NEWS. Tested building html / info / pdf versions of the manual. * math/gen-libm-test.py: Import os. (ALL_FLOATS_MANUAL): New constant. (ALL_FLOATS_SUFFIX): Likewise. (Ulps.all_functions): New function. (real_all_ulps): Likewise. (generate_err_table_sub): Likewise. (generate_err_table): Likewise. (main): Handle -s and -m options. * manual/libm-err-tab.pl: Remove. * manual/Makefile ($(objpfx)stamp-libm-err): Use gen-libm-test.py instead of libm-err-tab.pl. [$(PERL) != no]: Change condition to [$(if $(PYTHON),$(PERL),no) != no]. * manual/install.texi (Tools for Compilation): Document requirement for Python to build manual. * INSTALL: Regenerated.
* Y2038: Add 64-bit time for all architecturesAlbert ARIBAUD (3ADEV)2018-10-246-15/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc support for 64-bit time_t on 32-bit architectures will involve: - Using 64-bit times inside glibc, with conversions to and from 32-bit times taking place as necessary for interfaces using such times. - Adding 64-bit-time support in the glibc public API. This support should be dynamic, i.e. glibc should provide both 32-bit and 64-bit implementations and let user code choose at compile time whether to use the 32-bit or 64-bit interfaces. This requires a glibc-internal name for a type for times that are always 64-bit. Based on __TIMESIZE, a new macro is defined, __TIME64_T_TYPE, which is always the right __*_T_TYPE to hold a 64-bit-time. __TIME64_T_TYPE equals __TIME_T_TYPE if __TIMESIZE equals 64 and equals __SQUAD_T_TYPE otherwise. __time64_t can then replace uses of internal_time_t. This patch was tested by running 'make check' on branch master then applying this patch and its predecessor and running 'make check' again, and checking that both 'make check' yield identical results. This was done on x86_64-linux-gnu and i686-linux-gnu. * bits/time64.h: New file. * include/time.h: Replace internal_time_t with __time64_t. * posix/bits/types (__time64_t): Add. * stdlib/Makefile: Add bits/time64.h to includes. * time/tzfile.c: Replace internal_time_t with __time64_t.
* Fix date typo in ChangeLogAlbert ARIBAUD (3ADEV)2018-10-241-1/+1
|
* posix: Add internal symbols for posix_spawn interfaceAdhemerval Zanella2018-10-2412-12/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds internal hidden definition for mostly of the posix_spawn function so it can be used internally on both popen and system implementations. Checked on x86_64-linux-gnu. * include/spawn.h (__posix_spawn, posix_spawn_file_actions_addclose, __posix_spawn_file_actions_adddup2, __posix_spawn_file_actions_destroy, __posix_spawn_file_actions_init, __posix_spawnattr_init, __posix_spawnattr_destroy, __posix_spawnattr_setflags, __posix_spawnattr_setsigdefault, __posix_spawnattr_setsigmask): New prototype. * posix/spawn.c (__posix_spawn): Add libc_hidden_def. * posix/spawn_faction_addclose.c (__posix_spawn_file_actions_addclose): Add hidden definition. * posix/spawn_faction_adddup2.c (__posix_spawn_file_actions_adddup2): Likewise. * posix/spawn_faction_destroy.c (__posix_spawn_file_actions_destroy): Likewise. * posix/spawn_faction_init.c (__posix_spawn_file_actions_init): Likewise. * posix/spawnattr_destroy.c (__posix_spawnattr_destroy): Likewise. * posix/spawnattr_init.c (__posix_spawnattr_init): Likewise. * posix/spawnattr_setdefault.c (__posix_spawnattr_setsigdefault): Likewise. * posix/spawnattr_setflags.c (__posix_spawnattr_setflags): Likewise. * posix/spawnattr_setsigmask.c (__posix_spawnattr_setsigmask): Likewise.
* Add more checks for valid ld.so.cache file (bug 18093)Andreas Schwab2018-10-243-1/+16
|
* Y2038: provide size of default time_t for target architectureAlbert ARIBAUD (3ADEV)2018-10-2417-51/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To determine whether the default time_t interfaces are 32-bit and so need conversions, or are 64-bit and so are compatible with the internal 64-bit type without conversions, a macro giving the size of the default time_t is also required. This macro is called __TIMESIZE. This macro can then be used instead of __WORDSIZE in msq-pad.h and shm-pad.h files, which in turn allows removing their x86 variants, and in sem-pad.h files but keeping the x86 variant. This patch was tested by running 'make check' on branch master then applying this patch and running 'make check' again, and checking that both 'make check' yield identical results. This was done on x86_64-linux-gnu and i686-linux-gnu. * bits/timesize.h: New file. * stdlib/Makefile (headers): Add bits/timesize.h. * sysdeps/unix/sysv/linux/bits/msq-pad.h (__MSQ_PAD_AFTER_TIME): Use __TIMESIZE instead of __WORDSIZE. * sysdeps/unix/sysv/linux/bits/sem-pad.h (__SEM_PAD_AFTER_TIME): Likewise. * sysdeps/unix/sysv/linux/bits/shm-pad.h (__SHM_PAD_AFTER_TIME): Likewise. * sysdeps/unix/sysv/linux/hppa/bits/msq-pad.h (__MSQ_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/hppa/bits/sem-pad.h (__SEM_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/hppa/bits/shm-pad.h (__SHM_PAD_BEFORE_TIME, __SHM_PAD_BETWEEN_TIME_AND_SEGSZ): Likewise. * sysdeps/unix/sysv/linux/mips/bits/msq-pad.h (__MSQ_PAD_AFTER_TIME, __MSQ_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/msq-pad.h (__MSQ_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/sem-pad.h (__SEM_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/shm-pad.h (__SHM_PAD_BEFORE_TIME, __SHM_PAD_BETWEEN_TIME_AND_SEGSZ): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/msq-pad.h (__MSQ_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sem-pad.h (__SEM_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/shm-pad.h (__SHM_PAD_BEFORE_TIME): Likewise. * sysdeps/unix/sysv/linux/x86/bits/msq-pad.h: Delete file. * sysdeps/unix/sysv/linux/x86/bits/shm-pad.h: Likewise. * sysdeps/unix/sysv/linux/x86/bits/timesize.h: New file.
* x86: Support RDTSCP for benchtestsH.J. Lu2018-10-244-1/+35
| | | | | | | | | | | | | RDTSCP waits until all previous instructions have executed and all previous loads are globally visible before reading the counter. RDTSC doesn't wait until all previous instructions have been executed before reading the counter. All x86 processors since 2010 support RDTSCP instruction. This patch adds RDTSCP support to benchtests. * benchtests/Makefile (CPPFLAGS-nonlib): Add -DUSE_RDTSCP if USE_RDTSCP is defined. * sysdeps/x86/hp-timing.h (HP_TIMING_NOW): Use RDTSCP if USE_RDTSCP is defined.
* Fix tst-preadvwritev2 build failure on HURDAdhemerval Zanella2018-10-232-0/+8
| | | | | | | | | Commit 7a16bdbb9ff41 uses IOV_MAX, which is not defined on hurd. Checked on a build for i686-gnu. * misc/tst-preadvwritev2-common.c (IOV_MAX): Define if not defined.
* x86: Fix Haswell strong flags (BZ#23709)Adhemerval Zanella2018-10-232-0/+12
| | | | | | | | | | | | | | | | | | | Th commit 'Disable TSX on some Haswell processors.' (2702856bf4) changed the default flags for Haswell models. Previously, new models were handled by the default switch path, which assumed a Core i3/i5/i7 if AVX is available. After the patch, Haswell models (0x3f, 0x3c, 0x45, 0x46) do not set the flags Fast_Rep_String, Fast_Unaligned_Load, Fast_Unaligned_Copy, and Prefer_PMINUB_for_stringop (only the TSX one). This patch fixes it by disentangle the TSX flag handling from the memory optimization ones. The strstr case cited on patch now selects the __strstr_sse2_unaligned as expected for the Haswell cpu. Checked on x86_64-linux-gnu. [BZ #23709] * sysdeps/x86/cpu-features.c (init_cpu_features): Set TSX bits independently of other flags.
* time/tst-mktime2: Improve test error reportingFlorian Weimer2018-10-232-30/+51
|
* Don't use PSEUDO_END for non-PSEUDO functionAndreas Schwab2018-10-232-2/+7
|
* Update kernel version in syscall-names.list to 4.19.Joseph Myers2018-10-222-2/+5
| | | | | | | | | | | Linux 4.19 does not add any new syscalls (some existing ones are added to more architectures); this patch updates the version number in syscall-names.list to reflect that it's still current for 4.19. Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/syscall-names.list: Update kernel version to 4.19.
* Use Linux 4.19 in build-many-glibcs.py.Joseph Myers2018-10-222-1/+4
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default Linux version to 4.19.