about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable VDSO for static linking on aarch64Rafael Ávila de Espíndola2018-11-274-10/+15
| | | | | | | | [BZ #19767] * sysdeps/unix/sysv/linux/aarch64/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (ALWAYS_USE_VSYSCALL): Define.
* abilist.awk: Treat .tdata like .tbss and reject unknown combinations.Carlos O'Donell2018-11-262-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Mathieu Desnoyers ran into an issue with his rseq patch where he was the first person to add weak thread-local data and this resulted in an ABI list update with entries like this: "GLIBC_2.29 w ? D .tdata 0000000000000020". The weakness of the symbol has nothing to do with the DSOs ABI and so we should not write anything about weak symbols here. The .tdata entries should be treated exactly like .tbss entries and the output should have been: "GLIBC_2.29 __rseq_abi T 0x20" This change makes abilist.awk handle .tdata just like .tbss, while at the same time adding an error case for the default, and the unknown line cases. We never want anyone to be able to add such entries to any ABI list files and should see an immediate error and consult with experts. Tested by Mathieu Desnoyers <mathieu.desnoyers@efficios.com> with the rseq patch set and 'make update-all-abi'. Tested myself with 'make update-all-abi' on x86_64 with no changes. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* Touch more glibc source files in build-many-glibcs.py.Joseph Myers2018-11-262-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build-many-glibcs.py currently copies the source tree to avoid issues with parallel builds trying to write into it. This copying can result in occasional spurious build failures from bots, when a "git gc" is in progress that changes .git contents while copying is taking place, and it would also be desirable to avoid the need to copy to save on disk space, I/O and memory used in build-many-glibcs.py builds. In preparation for removing the copying, this patch arranges for build-many-glibcs.py to touch more files on checkout so their timestamps do not result in make attempting to rebuild them. Before actually removing the copying, I intend to do further tests to ensure I haven't missed any other such makefile dependencies. This is of course without prejudice to possibly moving more of these files to being generated in the build directory rather than being checked in at all, where that can be done using build tools already required for the build. For sysdeps files (installed and otherwise) it would be necessary to make sure this does not affect the search ordering, for headers used in the build it would be necessary to ensure they are generated early enough, and for errlist.c there may be dual licensing reasons for keeping it checked in. Tested that a checkout with build-many-glibcs.py does touch the expected files and that a glibcs build for aarch64-linux-gnu succeeds. * scripts/build-many-glibcs.py (Context.fix_glibc_timestamps): Touch additional files.
* malloc: tcache: Validate tc_idx before checking for double-frees [BZ #23907]Florian Weimer2018-11-262-25/+31
| | | | | | The previous check could read beyond the end of the tcache entry array. If the e->key == tcache cookie check happened to pass, this would result in crashes.
* Enable VDSO on powerpc statically linked programs (bug 19767)Rafael Ávila de Espíndola2018-11-265-9/+21
| | | | | | | | | | | | | [BZ #19767] * sysdeps/unix/sysv/linux/powerpc/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/powerpc/libc-vdso.h: Remove #ifdef SHARED. Include sysdep.h. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define ALWAYS_USE_VSYSCALL. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* Enable VDSO on x86_64 statically linked programs [BZ #19767]Rafael Ávila de Espíndola2018-11-2310-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the required code already existed, and some of it was already running. AT_SYSINFO_EHDR is processed if NEED_DL_SYSINFO_DSO is defined, but it looks like it always is. The call to setup_vdso is also unconditional, so all that was left to do was setup the function pointers and use them. This patch just deletes some #ifdef to enable that. [BZ #19767] * nptl/Makefile (tests-static): Add tst-cond11-static. (tests): Likewise. * nptl/tst-cond11-static.c: New File. * sysdeps/unix/sysv/linux/Makefile (tests-static): Add tst-affinity-static. (tests): Likewise. * sysdeps/unix/sysv/linux/sysdep-vdso.h: Check USE_VSYSCALL instead of SHARED. * sysdeps/unix/sysv/linux/sysdep.h (ALWAYS_USE_VSYSCALL): New. (USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/tst-affinity-static.c: New file. * sysdeps/unix/sysv/linux/x86/libc-vdso.h: Check USE_VSYSCALL instead of SHARED. * sysdeps/unix/sysv/linux/x86_64/init-first.c: Don't check SHARED. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (ALWAYS_USE_VSYSCALL): New.
* Fix Arm __ASSUME_COPY_FILE_RANGE (bug 23915).Joseph Myers2018-11-232-3/+11
| | | | | | | | | | | | | | | | | The generic kernel-features.h defines __ASSUME_COPY_FILE_RANGE for 4.5 and later kernels. However, for 32-bit Arm binaries running on 64-bit Arm kernels, the syscall was only wired up in the 4.7 kernel, although the 32-bit Arm kernel had the syscall from 4.5 onwards. This patch corrects the Arm kernel-features.h to undefine the macro for configured minimum kernel versions before 4.7. Tested (compilation only) with a build-many-glibcs.py build for arm-linux-gnueabi. [BZ #23915] * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION < 0x040700] (__ASSUME_COPY_FILE_RANGE): Undefine.
* x86/CET: Add a re-exec test with legacy bitmapH.J. Lu2018-11-233-2/+93
| | | | | | | | | | Add a re-exec test with legacy bitmap to verify that legacy bitmap is properly hanlded by kernel. * sysdeps/x86/Makefile (tests): Add tst-cet-legacy-1a. (tst-cet-legacy-1a-ARGS): New. ($(objpfx)tst-cet-legacy-1a): New target. * sysdeps/x86/tst-cet-legacy-1a.c: New file.
* Combine more conformtest tests into single execution of the compiler.Joseph Myers2018-11-222-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2018-11/msg00225.html>, Florian reported that the change from conformtest.pl to conformtest.py had increased conform/ test time, possibly because of increased startup overhead for Python scripts. This patch improves conformtest.py performance by arranging for as many tests of a (header, standard) pair as possible to use a single execution of the compiler, so it does not need to initialize and parse the whole header under test separately for every test assertion. Specifically, compilation tests that are not marked as "optional" or "xfail" are combined into a single source file, and are only then run separately if compilation of that combined file fails. For me, this reduces the wall clock time for the conformtest.py tests (not the whole of the conform/ directory) from two minutes to 15 seconds. Tested for x86_64, and with build-many-glibcs.py. * conform/conformtest.py (CompileSubTest.__init__): Set self.run_early to False. (ExecuteSubTest.__init__): Likewise. (HeaderTests.run): Try running all non-optional, non-XFAILed compilation tests in a single execution of the compiler.
* Separate conformtest subtest generation and execution.Joseph Myers2018-11-222-65/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues moving conformtest towards running more tests in a single compiler execution by separating the generation and execution of the subtests of each test. Instead of test classes having a run method that both generates the text of the programs to be compiled or executed, and compiles or executes them, they are changed to having a gen_subtests method that just generates CompileSubTest and ExecuteSubTest objects to store the subtest names and text, and then a separate loop in HeaderTests.run deals with actually executing those subtests. This will allow for future changes to extract the text for all non-optional, non-xfail compilation subtests to try compiling those all at once, with separate compilations only if that fails, so massively reducing the number of separate compiler executions (each of which needs to parse the entire contents of the header under test, in addition to the startup cost that applies even for compiling an empty file). Tested for x86_64, and with build-many-glibcs.py. * conform/conformtest.py (CompileSubTest): New class. (ExecuteSubTest): Likewise. (ElementTest.run): Rename to gen_subtests. Append tests to self.subtests instead of running them. (ConstantTest.run): Likewise. (SymbolTest.run): Likewise. (TypeTest.run): Likewise. (TagTest.run): Likewise. (FunctionTest.run): Likewise. (VariableTest.run): Likewise. (MacroFunctionTest.run): Likewise. (MacroStrTest.run): Likewise. (HeaderTests.handle_test_line): Generate subtests for tests. (HeaderTests.run): Run subtests for tests.
* Remove the error handling wrapper from powSzabolcs Nagy2018-11-2137-15/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new pow symbol version that doesn't do SVID compatible error handling. The standard errno and fp exception based error handling is inline in the new code and does not have significant overhead. The wrapper is disabled for sysdeps/ieee754/dbl-64 by using empty w_pow.c and enabled for targets with their own pow implementation or ifunc dispatch on __ieee754_pow by including math/w_pow.c. The compatibility symbol version still uses the wrapper with SVID error handling around the new code. There is no new symbol version nor compatibility code on !LIBM_SVID_COMPAT targets (e.g. riscv). On targets where previously powl was an alias of pow, now it points to the compatibility symbol with the wrapper, because it still need the SVID compatible error handling. This affects NO_LONG_DOUBLE (e.g. arm) and LONG_DOUBLE_COMPAT (e.g. alpha) targets as well. The __pow_finite symbol is now an alias of pow. Both __pow_finite and pow set errno and thus not const functions. The ia64 asm is changed so the compat and new symbol versions map to the same address. On x86_64 #include <math.h> was added before macro definitions that may affect that header. Tested with build-many-glibcs.py. * math/Versions (GLIBC_2.29): Add pow. * math/w_pow_compat.c (__pow_compat): Change to versioned compat symbol. * math/w_pow.c: New file. * sysdeps/i386/fpu/w_pow.c: New file. * sysdeps/ia64/fpu/e_pow.S: Add versioned symbols. * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Rename to __pow and add necessary aliases. * sysdeps/ieee754/dbl-64/w_pow.c: New file. * sysdeps/m68k/m680x0/fpu/w_pow.c: New file. * sysdeps/mach/hurd/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Update. * sysdeps/unix/sysv/linux/arm/libm.abilist: Update. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Update. * sysdeps/unix/sysv/linux/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Update. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Update. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Update. * sysdeps/unix/sysv/linux/sh/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Update. * sysdeps/x86_64/fpu/multiarch/e_pow-fma.c (__ieee754_pow): Rename to __pow. * sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c (__ieee754_pow): Likewise. * sysdeps/x86_64/fpu/multiarch/e_pow.c (__ieee754_pow): Likewise. * sysdeps/x86_64/fpu/multiarch/w_pow.c: New file.
* Remove the error handling wrapper from log2Szabolcs Nagy2018-11-2133-10/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new log2 symbol version that doesn't do SVID compatible error handling. The standard errno and fp exception based error handling is inline in the new code and does not have significant overhead. The wrapper is disabled for sysdeps/ieee754/dbl-64 by using empty w_log2.c and enabled for targets with their own log2 implementation by including math/w_log2.c. The compatibility symbol version still uses the wrapper with SVID error handling around the new code. There is no new symbol version nor compatibility code on !LIBM_SVID_COMPAT targets (e.g. riscv). On targets where previously log2l was an alias of log2, now it points to the compatibility symbol with the wrapper, because it still need the SVID compatible error handling. This affects NO_LONG_DOUBLE (e.g. arm) and LONG_DOUBLE_COMPAT (e.g. alpha) targets as well. The __log2_finite symbol is now an alias of log2. Both __log2_finite and log2 set errno and thus not const functions. The ia64 asm is changed so the compat and new symbol versions map to the same address. Tested with build-many-glibcs.py. * math/Versions (GLIBC_2.29): Add log2. * math/w_log2_compat.c (__log2_compat): Change to versioned compat symbol. * math/w_log2.c: New file. * sysdeps/i386/fpu/w_log2.c: New file. * sysdeps/ia64/fpu/e_log2.S: Add versioned symbols. * sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Rename to __log2 and add necessary aliases. * sysdeps/ieee754/dbl-64/w_log2.c: New file. * sysdeps/m68k/m680x0/fpu/w_log2.c: New file. * sysdeps/mach/hurd/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Update. * sysdeps/unix/sysv/linux/arm/libm.abilist: Update. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Update. * sysdeps/unix/sysv/linux/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Update. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Update. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Update. * sysdeps/unix/sysv/linux/sh/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Update.
* Remove the error handling wrapper from logSzabolcs Nagy2018-11-2138-11/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new log symbol version that doesn't do SVID compatible error handling. The standard errno and fp exception based error handling is inline in the new code and does not have significant overhead. The wrapper is disabled for sysdeps/ieee754/dbl-64 by using empty w_log.c and enabled for targets with their own log implementation by including math/w_log.c. The compatibility symbol version still uses the wrapper with SVID error handling around the new code. There is no new symbol version nor compatibility code on !LIBM_SVID_COMPAT targets (e.g. riscv). On targets where previously logl was an alias of log, now it points to the compatibility symbol with the wrapper, because it still need the SVID compatible error handling. This affects NO_LONG_DOUBLE (e.g. arm) and LONG_DOUBLE_COMPAT (e.g. alpha) targets as well. The __log_finite symbol is now an alias of log. Both __log_finite and log set errno and thus not const functions. The ia64 asm is changed so the compat and new symbol versions map to the same address. On x86_64 #include <math.h> was added before macro definitions that may affect that header. Tested with build-many-glibcs.py. * math/Versions (GLIBC_2.29): Add log. * math/w_log_compat.c (__log_compat): Change to versioned compat symbol. * math/w_log.c: New file. * sysdeps/i386/fpu/w_log.c: New file. * sysdeps/ia64/fpu/e_log.S: Update. * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Rename to __log and add necessary aliases. * sysdeps/ieee754/dbl-64/w_log.c: New file. * sysdeps/m68k/m680x0/fpu/w_log.c: New file. * sysdeps/mach/hurd/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Update. * sysdeps/unix/sysv/linux/arm/libm.abilist: Update. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Update. * sysdeps/unix/sysv/linux/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Update. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Update. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Update. * sysdeps/unix/sysv/linux/sh/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Update. * sysdeps/x86_64/fpu/multiarch/e_log-avx.c (__ieee754_log): Rename to __log. * sysdeps/x86_64/fpu/multiarch/e_log-fma.c (__ieee754_log): Likewise. * sysdeps/x86_64/fpu/multiarch/e_log-fma4.c (__ieee754_log): Likewise. * sysdeps/x86_64/fpu/multiarch/e_log.c (__ieee754_log): Likewise. * sysdeps/x86_64/fpu/multiarch/w_log.c: New file.
* Remove the error handling wrapper from exp and exp2Szabolcs Nagy2018-11-2145-23/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new exp and exp2 symbol version that don't do SVID compatible error handling. The standard errno and fp exception based error handling is inline in the new code and does not have significant overhead. The double precision wrappers are disabled for sysdeps/ieee754/dbl-64 by using empty w_exp.c and w_exp2.c files, the math/w_exp.c and math/w_exp2.c files use the wrapper template and can be included by targets that have their own exp and exp2 implementations or use ifunc on the glibc internal __ieee754_exp symbol. The compatibility symbol versions still use the wrapper with SVID error handling around the new code. There is no new symbol version nor compatibility code on !LIBM_SVID_COMPAT targets (e.g. riscv). On targets where previously expl and exp2l were aliases of exp and exp2, now they point to the compatibility symbols with the wrapper, because they still need the SVID compatible error handling. This affects NO_LONG_DOUBLE (e.g arm) and LONG_DOUBLE_COMPAT (e.g. alpha) targets as well. The _finite symbols are now aliases of the standard symbols (they have no performance advantage anymore). Both the standard symbols and _finite symbols set errno and thus not const functions. The ia64 asm is changed so the compat and new symbol versions map to the same address. On x86_64 #include <math.h> was added before macro definitions that may affect that header (the new macro name is __exp instead of __ieee754_exp which breaks some math.h macros). Tested with build-many-glibcs.py. * math/Versions (GLIBC_2.29): Add exp and exp2. * math/w_exp2_compat.c (__exp2_compat): Change to versioned compat symbol, handle NO_LONG_DOUBLE and LONG_DOUBLE_COMPAT explicitly. * math/w_exp_compat.c (__exp_compat): Likewise. * math/w_exp.c: New file. * math/w_exp2.c: New file. * sysdeps/i386/fpu/w_exp.c: New file. * sysdeps/i386/fpu/w_exp2.c: New file. * sysdeps/ia64/fpu/e_exp.S: Add versioned symbols. * sysdeps/ia64/fpu/e_exp2.S: Likewise. * sysdeps/ieee754/dbl-64/e_exp.c (__ieee754_exp): Rename to __exp and add necessary aliases. * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Rename to __exp2 and add necessary aliases. * sysdeps/ieee754/dbl-64/w_exp.c: New file. * sysdeps/ieee754/dbl-64/w_exp2.c: New file. * sysdeps/m68k/m680x0/fpu/w_exp.c: New file. * sysdeps/m68k/m680x0/fpu/w_exp2.c: New file. * sysdeps/mach/hurd/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Update. * sysdeps/unix/sysv/linux/arm/libm.abilist: Update. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Update. * sysdeps/unix/sysv/linux/i386/libm.abilist: Update. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Update. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Update. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Update. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Update. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Update. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Update. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Update. * sysdeps/unix/sysv/linux/sh/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Update. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Update. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Update. * sysdeps/x86_64/fpu/multiarch/e_exp-avx.c (__exp1): Remove. (__ieee754_exp): Rename to __exp. * sysdeps/x86_64/fpu/multiarch/e_exp-fma.c (__exp1): Remove. (__ieee754_exp): Rename to __exp. * sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c (__exp1): Remove. (__ieee754_exp): Rename to __exp. * sysdeps/x86_64/fpu/multiarch/e_exp.c (__ieee754_exp): Rename to __exp. * sysdeps/x86_64/fpu/multiarch/w_exp.c: New file.
* malloc: tcache double free checkDJ Delorie2018-11-207-1/+148
| | | | | | | | | | | | | * malloc/malloc.c (tcache_entry): Add key field. (tcache_put): Set it. (tcache_get): Likewise. (_int_free): Check for double free in tcache. * malloc/tst-tcfree1.c: New. * malloc/tst-tcfree2.c: New. * malloc/Makefile: Run the new tests. * manual/probes.texi: Document memory_tcache_double_free probe. * dlfcn/dlerror.c (check_free): Prevent double frees.
* [AArch64] Adjust writeback in non-zero memsetWilco Dijkstra2018-11-202-3/+8
| | | | | | | | This fixes an ineffiency in the non-zero memset. Delaying the writeback until the end of the loop is slightly faster on some cores - this shows ~5% performance gain on Cortex-A53 when doing large non-zero memsets. * sysdeps/aarch64/memset.S (MEMSET): Improve non-zero memset loop.
* Use unique identifiers in conformtest.Joseph Myers2018-11-202-76/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes tests in conformtest use unique identifiers, in preparation for trying to cover more tests in a single compilation to speed up these tests as suggested in <https://sourceware.org/ml/libc-alpha/2018-11/msg00229.html>. Tests are assigned a number, used in generating identifiers; where a single call to a run method does multiple compilations (sharing that number), identifiers are changed as needed to avoid duplication between those compilations, so they can be combined in future. Large numbers of positional arguments to format strings make the code harder to follow, and using the test numbers serves to increase the number of arguments to such format strings, so the code is generally changed to use %(name)s where all the arguments come from attributes of the test object and so vars(self) is sufficient to provide all those names for the format string. Cases where some arguments aren't attributes of self still use positional format arguments. Tested for x86_64, and with build-many-glibcs.py. * conform/conformtest.py (ElementTest.run): Use unique identifiers in tests. Use names for format arguments. (ConstantTest.run): Likewise. (SymbolTest.run): Likewise. (TypeTest.run): Likewise. (TagTest.run): Likewise. (FunctionTest.run): Likewise. (VariableTest.run): Likewise. (MacroFunctionTest.run): Likewise. (MacroStrTest.run): Likewise. (HeaderTests.__init__): Set self.num_tests. (HeaderTests.handle_test_line): Set test.num. Increment self.num_tests.
* hurd: Support lockf at offset 0 with size 0 or 1.Samuel Thibault2018-11-192-0/+19
| | | | | | * sysdeps/mach/hurd/f_setlk.c: Include <unistd.h>. (__f_setlk): When whence is SEEK_CUR, use __lseek64 to convert it to SEEK_SET.
* Update config.guess and config.sub to current versions.Mao Han2018-11-193-1555/+1522
| | | | | * scripts/config.guess: Update to version 2018-08-29. * scripts/config.sub: Update to version 2018-08-29.
* support: Print timestamps in timeout handlerFlorian Weimer2018-11-192-0/+35
| | | | | | This is sometimes useful to determine if a test truly got stuck, or if it was making progress (logging information to standard output) and was merely slow to finish.
* Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.Zack Weinberg2018-11-167-37/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | On platforms where long double used to have the same format as double, but later switched to a different format (alpha, s390, sparc, and powerpc), accessing the older behavior is possible and it happens via __nldbl_* functions (not on the API, but accessible from header redirection and from compat symbols). These functions write to the global flag __ldbl_is_dbl, which tells other functions that long double variables should be handled as double. This patch takes the first step towards removing this global flag and creates __vstrfmon_l_internal, which takes an explicit flags parameter. This change arguably makes the generated code slightly worse on architectures where __ldbl_is_dbl is never true; right now, on those architectures, it's a compile-time constant; after this change, the compiler could theoretically prove that __vstrfmon_l_internal was never called with a nonzero flags argument, but it would probably need LTO to do it. This is not performance critical code and I tend to think that the maintainability benefits of removing action at a distance are worth it. However, we _could_ wrap the runtime flag check with a macro that was defined to ignore its argument and always return false on architectures where __ldbl_is_dbl is never true, if people think the codegen benefits are important. Tested for powerpc and powerpc64le.
* hurd: Fix F_*LK* fcntl with __USE_FILE_OFFSET64Samuel Thibault2018-11-167-34/+151
| | | | | | | | | | | | | | | | | | struct flock64 uses 64bit values. This introduces other values for F_GETLK, F_SETLK, F_SETLKW to distinguish between both. * sysdeps/mach/hurd/bits/fcntl.h (F_GETLK64, F_SETLK64, F_SETLKW64): New macros [__USE_FILE_OFFSET64] (F_GETLK, F_SETLK, F_SETLKW): Define to F_GETLK64, F_SETLK64, F_SETLKW64, respectively. * sysdeps/mach/hurd/f_setlk.c: New file. * sysdeps/mach/hurd/f_setlk.h: New file. * sysdeps/mach/hurd/Makefile [$(subdir) = io] (sysdeps_routines): Add f_setlk. * sysdeps/mach/hurd/fcntl.c: Include "f_setlk.h".h". (__libc_fcntl): Move non-flock operations to... * sysdeps/mach/hurd/vfcntl.c (__libc_vfcntl): ... New file. * sysdeps/mach/hurd/fcntl.c (fcntl64): Add missing alias.
* mktime: DEBUG_MKTIME cleanupPaul Eggert2018-11-152-160/+8
| | | | | | | The DEBUG_MKTIME code no longer works in glibc or in Gnulib. And it’s no longer needed now that glibc and Gnulib both have their own testing mechanisms for mktime. * time/mktime.c (DEBUG_MKTIME): Remove. All uses removed.
* mktime: fix non-EOVERFLOW errno handlingPaul Eggert2018-11-152-98/+113
| | | | | | | | | | | | | | | [BZ#23789] mktime was not properly reporting failures when the underlying localtime_r fails with errno != EOVERFLOW; it incorrectly treated them like EOVERFLOW failures, and set errno to EOVERFLOW. The problem could happen on non-glibc platforms, with Gnulib. * time/mktime.c (guess_time_tm): Remove, replacing with ... (tm_diff): ... this simpler function, which does not change errno. All callers changed to deal with errno themselves. (ranged_convert, __mktime_internal): Return failure immediately if the underlying function reports any failure other than EOVERFLOW. (__mktime_internal): Set errno to EOVERFLOW if the spring-forward gap code fails.
* mktime: fix bug with Y2038 DST transitionPaul Eggert2018-11-152-1/+10
| | | | | | | | [BZ#23789] * time/mktime.c (ranged_convert): On 32-bit platforms, don’t mishandle a DST transition that jumps over the Y2038 boundary. No such DST transitions are known so this is only a theoretical bug, but we might as well do things right.
* mktime: make more room for overflowPaul Eggert2018-11-152-9/+17
| | | | | | | [BZ#23789] * time/mktime.c (long_int): Now 4⨯ int, not just 3⨯. This is so that we can add tm_diff results to a previous guess, which will be useful in a later patch.
* mktime: simplify offset guessPaul Eggert2018-11-152-3/+7
| | | | | [BZ#23789] * time/mktime.c (__mktime_internal): Omit excess precision.
* mktime: new test for mktime failurePaul Eggert2018-11-153-1/+100
| | | | | | | | [BZ#23789] Based on a test suggested by Albert Aribaud in: https://www.sourceware.org/ml/libc-alpha/2018-10/msg00662.html * time/Makefile (tests): Add bug-mktime4. * time/bug-mktime4.c: New file.
* mktime: fix EOVERFLOW bugPaul Eggert2018-11-152-7/+27
| | | | | | | [BZ#23789] * time/mktime.c [!_LIBC && !DEBUG_MKTIME]: Include libc-config.h, not config.h, for __set_errno. (guess_time_tm, __mktime_internal): Set errno to EOVERFLOW on overflow.
* hurd: Fix build with GCC 9Samuel Thibault2018-11-142-2/+10
| | | | | | | * sysdeps/mach/hurd/dl-sysdep.c (check_no_hidden): Use __attribute_copy__ to copy attributes from name. Drop static qualifier to avoid warnings about leaf attribute not having effect on static functions.
* malloc: Use current (C11-style) atomics for fastbin accessFlorian Weimer2018-11-132-70/+105
|
* Fix mips build with GCC 9.Joseph Myers2018-11-132-1/+9
| | | | | | | | | | | | | This patch fixes the build for MIPS (o32) with GCC 9 by stopping MIPS __longjmp from using strong_alias, instead defining the alias manually, so that the intended effect of not copying the nomips16 attribute is achieved, as explained in the included comment. Tested with build-many-glibcs.py compilers build for mips64-linux-gnu (which includes glibc builds for all three ABIs). * sysdeps/mips/__longjmp.c (__longjmp): Define alias manually with alias attribute, not with strong_alias.
* Add hidden_tls_def macros, fix powerpc-soft build with GCC 9.Joseph Myers2018-11-133-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soft-float powerpc fails to build with current GCC mainline because of use of libc_hidden_data_def for TLS variables, resulting in a non-TLS alias being defined, to which the tls_model attribute is now copied, resulting in a warning about it being ignored. The problem here appears to be the non-TLS alias. This patch adds a hidden_tls_def macro family, corresponding to the hidden_tls_proto macros, to define TLS aliases properly in such a case, and uses it for those powerpc soft-float variables. Tested with build-many-glibcs.py compilers build for powerpc-linux-gnu soft-float. Also tested for x86_64. * include/libc-symbols.h [SHARED && !NO_HIDDEN && !__ASSEMBLER__] (__hidden_ver2): New macro. Use old definition of __hidden_ver1 with additional parameter thread. [SHARED && !NO_HIDDEN && !__ASSEMBLER__] (__hidden_ver1): Define in terms of __hidden_ver2. (hidden_tls_def): New macro. (libc_hidden_tls_def): Likewise. (rtld_hidden_tls_def): Likewise. (libm_hidden_tls_def): Likewise. (libmvec_hidden_tls_def): Likewise. (libresolv_hidden_tls_def): Likewise. (librt_hidden_tls_def): Likewise. (libdl_hidden_tls_def): Likewise. (libnss_files_hidden_tls_def): Likewise. (libnsl_hidden_tls_def): Likewise. (libnss_nisplus_hidden_tls_def): Likewise. (libutil_hidden_tls_def): Likewise. (libutil_hidden_tls_def): Likweise. * sysdeps/powerpc/nofpu/sim-full.c (__sim_exceptions_thread): Use libc_hidden_tls_def. (__sim_disabled_exceptions_thread): Likewise. (__sim_round_mode_thread): Likewise.
* Fix sparc64 build with GCC 9.Joseph Myers2018-11-132-1/+8
| | | | | | | | | | | | | | | | Similar to the x86_64 and armv7 build issues, glibc fails to build for sparc64 with current mainline GCC because of aliases declared in the course of defining IFUNCs, which copy their attributes from a header declaration, ending up with fewer attributes than the (built-in) string function they alias. This patch fixes the issue similarly to the fixes for those other architectures. Tested with build-many-glibcs.py compilers build for sparc64-linux-gnu. * sysdeps/sparc/sparc-ifunc.h [SHARED] (sparc_ifunc_redirected_hidden_def): Use __attribute_copy__ to copy attributes from name.
* Fix armv7 build with GCC 9.Joseph Myers2018-11-122-1/+5
| | | | | | | | | | | | | | | | | | | Similar to the x86_64 build issues, glibc fails to build for armv7 with current mainline GCC because of aliases declared in the course of defining IFUNCs, which copy their attributes from a header declaration, ending up with fewer attributes than the (built-in) string function they alias: the relevant attributes (nonnull, leaf) are present on the header declaration, but elided therefrom when glibc itself if being built (whatever the reasons are for disabling the nonnull and leaf attributes in that case, and whether or not those reasons are actually still valid). This patch fixes the issue similarly to the x86_64 fix, by adding an addition __attribute_copy__ use (in this case, on the definition of arm_libc_ifunc_hidden_def). Tested with build-many-glibcs.py build for armeb-linux-gnueabi-be8. * sysdeps/arm/arm-ifunc.h [SHARED] (arm_libc_ifunc_hidden_def): Use __attribute_copy__ to copy attributes from name.
* Fix i686 build with GCC 9.Joseph Myers2018-11-127-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the glibc build for i686 with current mainline GCC, where there are warnings about inconsistent attributes for aliases in certain files defining libm IFUNCs. In three of the files, the aliases were defined in terms of internal symbols such as __sinf, and copied attributes from file-local declarations of those functions which lacked the nothrow attribute. Since the nothrow attribute is present on the declarations from <math.h> (which include declarations of those __-prefixed functions), the natural fix was to include <math.h> in those files, replacing the local declarations. In the other three files, a more complicated __hidden_ver1 call was involved in the warnings. <math.h> has not been included at this point and, furthermore, it is included indirectly only later in the source file after macros have been defined to remap a function name therein. So there isn't an obvious declaration from which to copy the attribute and it seems simplest and safest just to add __THROW to the hidden_ver1 calls. Tested for i686 (build-many-glibcs.py compilers build for x86_64-linux-gnu with GCC mainline; full testsuite run with GCC 7). * sysdeps/i386/i686/fpu/multiarch/e_expf.c [SHARED]: Use __THROW with __hidden_ver1 call. * sysdeps/i386/i686/fpu/multiarch/e_log2f.c [SHARED]: Likewise. * sysdeps/i386/i686/fpu/multiarch/e_logf.c [SHARED]: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Include <math.h>. (__cosf): Do not declare here. * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: Include <math.h>. (__sincosf): Do not declare here. * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: Include <math.h>. (__sinf): Do not declare here.
* Remove redundant macro definitions from ia64 sfp-machine.h.Joseph Myers2018-11-122-10/+8
| | | | | | | | | | | | | | | | | | | | After the changes to use the copy attribute, building glibc for ia64 fails, even with older compilers, because sysdeps/ia64/fpu/sfp-machine.h has a definition of _strong_alias that now differs from the one in libc-symbols.h. That definition is a relic of this file coming from libgcc, as are some other such macro definitions in this file; in the glibc context, there is no need for those macros, and this patch removes them to fix the build. Tested with build-many-glibcs.py for ia64-linux-gnu. * sysdeps/ia64/fpu/sfp-machine.h (__LITTLE_ENDIAN): Remove. (__BIG_ENDIAN): Likewise. (__BYTE_ORDER): Likewise. (strong_alias): Likewise. (_strong_alias): Likewise.
* malloc: Convert the unlink macro to the unlink_chunk functionFlorian Weimer2018-11-123-47/+62
| | | | | | | This commit is in preparation of turning the macro into a proper function. The output arguments of the macro were in fact unused. Also clean up uses of __builtin_expect.
* hurd: Fix spawni's user_link reallocationSamuel Thibault2018-11-111-2/+2
| | | | | * hurd/hurd/userlink.h (_hurd_userlink_move): Make new_link's predecessor point to new_link instead of link.
* hurd: Document dtable_cloexec size convention.Samuel Thibault2018-11-112-1/+3
| | | | | * sysdeps/mach/hurd/spawni.c (__spawni): Use orig_dtablesize instead of dtablesize for allocating dtable_cloexec.
* Hurd: export _hurd_port_moveSamuel Thibault2018-11-103-0/+8
| | | | | | * hurd/Versions (_hurd_port_move): Export function. * sysdeps/mach/hurd/i386/libc.abilist (_hurd_port_move): Expect symbol.
* Hurd: Fix ulinks in fd table reallocationSamuel Thibault2018-11-104-1/+64
| | | | | | | * hurd/hurd/userlink.h (_hurd_userlink_move): New function. * hurd/hurd/port.h (_hurd_port_move): New function. * sysdeps/mach/hurd/spawni.c (NEW_ULINK_TABLE): New macro. (EXPAND_DTABLE): Use NEW_ULINK_TABLE macro for ulink_dtable.
* Hurd: Implement chdir support in posix_spawnSamuel Thibault2018-11-102-10/+85
| | | | | | | | | | | | This fixes build-many-glibcs.py on i686-gnu. Thanks Florian Weimer for the initial version. * sysdeps/mach/hurd/spawni.c (__spawni): Add ccwdir port. Test and use it, free it if needed. (reauthenticate): Test and use ccwdir. (child_init_port): In non-resetids case, test and use ccwdir. (child_chdir): New nested function to set ccwdir.
* Add support for GCC 9 attribute copy.Martin Sebor2018-11-0921-26/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 9 has gained an enhancement to help detect attribute mismatches between alias declarations and their targets. It consists of a new warning, -Wattribute-alias, an enhancement to an existing warning, -Wmissing-attributes, and a new attribute called copy. The purpose of the warnings is to help identify either possible bugs (an alias declared with more restrictive attributes than its target promises) or optimization or diagnostic opportunities (an alias target missing some attributes that it could be declared with that might benefit analysis and code generation). The purpose of the new attribute is to easily apply (almost) the same set of attributes to one declaration as those already present on another. As expected (and intended) the enhancement triggers warnings for many alias declarations in Glibc code. This change, tested on x86_64-linux, avoids all instances of the new warnings by making use of the attribute where appropriate. To fully benefit from the enhancement Glibc will need to be compiled with -Wattribute-alias=2 and remaining warnings reviewed and dealt with (there are a couple of thousand but most should be straightforward to deal with). ChangeLog: * include/libc-symbols.h (__attribute_copy__): Define macro unless it's already defined. (_strong_alias): Use __attribute_copy__. (_weak_alias, __hidden_ver1, __hidden_nolink2): Same. * misc/sys/cdefs.h (__attribute_copy__): New macro. * sysdeps/x86_64/multiarch/memchr.c (memchr): Use __attribute_copy__. * sysdeps/x86_64/multiarch/memcmp.c (memcmp): Same. * sysdeps/x86_64/multiarch/mempcpy.c (mempcpy): Same. * sysdeps/x86_64/multiarch/memset.c (memset): Same. * sysdeps/x86_64/multiarch/stpcpy.c (stpcpy): Same. * sysdeps/x86_64/multiarch/strcat.c (strcat): Same. * sysdeps/x86_64/multiarch/strchr.c (strchr): Same. * sysdeps/x86_64/multiarch/strcmp.c (strcmp): Same. * sysdeps/x86_64/multiarch/strcpy.c (strcpy): Same. * sysdeps/x86_64/multiarch/strcspn.c (strcspn): Same. * sysdeps/x86_64/multiarch/strlen.c (strlen): Same. * sysdeps/x86_64/multiarch/strncmp.c (strncmp): Same. * sysdeps/x86_64/multiarch/strncpy.c (strncpy): Same. * sysdeps/x86_64/multiarch/strnlen.c (strnlen): Same. * sysdeps/x86_64/multiarch/strpbrk.c (strpbrk): Same. * sysdeps/x86_64/multiarch/strrchr.c (strrchr): Same. * sysdeps/x86_64/multiarch/strspn.c (strspn): Same.
* Convert tst-efgcvt to the new test frameworkGabriel F. T. Gomes2018-11-092-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function do_test, in tst-efgcvt.c, increments an error counter for each error that it finds, then returns it to the test framework. However, the test framework does not expect an error count as return, but zero for a passing test, one for a failing test, or 77 for an unsupported test. Alternatively, the framework provides the function support_record_failure that records errors, which then allows the test program to return zero unconditionally. This patch removes the error counter, replaces each increment of the counter with a call to support_record_failure, and makes do_test unconditionally return zero. Tested for powerpc64le (as-is and with a patched results table to check that the error reporting actually works). * misc/tst-efgcvt.c: Include support/check.h and support/test-driver.c. Do not include test-skeleton.c. (error_count): Remove. (output_error): Replace increments to error_count with calls to support_record_failure. (output_r_error): Likewise. (special): Likewise. (do_test): Unconditionally return zero. (TEST_FUNCTION): Remove.
* Update conform/Makefile mkdir commands.Joseph Myers2018-11-092-2/+6
| | | | | | | | | | | | | | | | conform/Makefile creates $(@D)/scratch for the per-standard per-header tests. That directory was formerly used by the Perl scripts for temporary files, but the Python implementations use tempfile.TemporaryDirectory to get such files cleaned up automatically. This patch changes the Makefile to create only $(@D) (required for the output redirection to work), not the scratch subdirectory. Tested for x86_64. * conform/Makefile ($(conformtest-header-tests)): Create $(@D), not $(@D)/scratch. ($(linknamespace-header-tests)): Likewise.
* Replace conformtest.pl with conformtest.py.Joseph Myers2018-11-0911-995/+730
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the consolidation on Python for various miscellaneous build and test scripts, this patch moves conformtest from Perl to Python. The substance of the tests run is intended to be the same as before, except that the previous test for tags did not actually achieve the intended purpose of verifying whether a tag was already declared, so is changed to one that would actually fail for a tag that wasn't declared, and a typo in the old test for variables being available ($xyzzy instead of xyzzy) would have made that test not use the correct type (but it would have passed anyway with warnings). No attempt is made to keep the details of what the test output looks like; instead, tests are given names which are made to follow PASS: / FAIL: / XFAIL: / SKIP: / MISSING: as appropriate. In the new version, there is more consistent parsing of test lines (into a series of words, either surrounded by {} or separated by spaces) that applies for all kinds of test lines, rather than the old approach of different regular expressions for every kind of test. A few of the conform/data/ files are adjusted so their syntax works with the new script (which now requires spaces in certain cases where the old script tolerated them being missing, and does not allow stray semicolons at the end of "function" lines). Similarly, common logic is used around what happens with a second subtest if a first one fails (e.g., a test for a symbol's type if the test for availability fails), rather than such logic being replicated separately for each kind of test. Common parsing also applies for test lines both when they are lines for the header under test and when they are lines for another header specified with allow-header, again unlike the old script. Tested for x86_64, and with build-many-glibcs.py. * conform/conformtest.py: New file. * conform/conformtest.pl: Remove. * conform/GlibcConform.pm: Likewise. * conform/glibcconform.py (KEYWORDS_C90): New constant. (KEYWORDS_C99): Likewise. (KEYWORDS): Likewise. * conform/Makefile ($(conformtest-header-tests)): Use conformtest.py instead of conformtest.pl. Do not pass --tmpdir option. Use --header instead of --headers. * conform/data/arpa/inet.h-data: Remove trailing semicolons on function entries. * conform/data/spawn.h-data: Likewise. * conform/data/fcntl.h-data (openat): Add space after function name. * conform/data/wchar.h-data (wcscasecmp): Likewise. (wcscasecmp_l): Likewise. * conform/data/termios.h-data (c_cc): Add space after element name.
* Use TEST_COMPARE_STRING in recently added testGabriel F. T. Gomes2018-11-084-21/+10
| | | | | | | | | | | | | | | | | | | | | | | The commit commit 1df872fd74f730bcae3df201a229195445d2e18a Author: Florian Weimer <fweimer@redhat.com> Date: Wed Nov 7 12:42:44 2018 +0100 support: Implement TEST_COMPARE_STRING added the new macro TEST_COMPARE_STRING, which compares the output of functions under test against expected strings, and, when there's a mismatch, automatically reports an error and prints the differences. This patch adapts recently added test cases to use this new macro. Tested for powerpc64le (as is, and locally patched to intentionally fail and produce error output). * argp/tst-ldbl-argp.c (do_one_test): Use TEST_COMPARE_STRING, instead of manually comparing and reporting mismatching strings. * misc/tst-ldbl-error.c (do_one_test): Likewise. * misc/tst-ldbl-warn.c (do_one_test): Likewise.
* Remove __ASSUME_SOCKETCALL.Joseph Myers2018-11-089-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __ASSUME_SOCKETCALL macro in kernel-features.h is no longer used for anything. (It used to be used in defining other macros related to accept4 / recvmmsg / sendmmsg availability, but the code in that area was simplified once we could assume a kernel with those features, whether through a syscall or through socketcall, so allowing those functions to be handled much like other socket operations, without requring __ASSUME_SOCKETCALL.) This patch removes that unused macro. (Note: once we can assume a Linux 4.4 or later kernel, much of the support for using socketcall at all can be removed from glibc, although a few functions may need that support in glibc for longer.) Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/kernel-features.h: Remove comment about __ASSUME_SOCKETCALL. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_SOCKETCALL): Remove. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_SOCKETCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_SOCKETCALL): Likewise.
* Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509]H.J. Lu2018-11-083-14/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linkers group input note sections with the same name into one output note section with the same name. One output note section is placed in one PT_NOTE segment. Since new linkers merge input .note.gnu.property sections into one output .note.gnu.property section, there is only one NT_GNU_PROPERTY_TYPE_0 note in one PT_NOTE segment with new linkers. Since older linkers treat input .note.gnu.property section as a generic note section and just concatenate all input .note.gnu.property sections into one output .note.gnu.property section without merging them, we may see multiple NT_GNU_PROPERTY_TYPE_0 notes in one PT_NOTE segment with older linkers. When an older linker is used to created the program on CET-enabled OS, the linker output has a single .note.gnu.property section with multiple NT_GNU_PROPERTY_TYPE_0 notes, some of which have IBT and SHSTK enable bits set even if the program isn't CET enabled. Such programs will crash on CET-enabled machines. This patch updates the note parser: 1. Skip note parsing if a NT_GNU_PROPERTY_TYPE_0 note has been processed. 2. Check multiple NT_GNU_PROPERTY_TYPE_0 notes. [BZ #23509] * sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Skip note parsing if a NT_GNU_PROPERTY_TYPE_0 note has been processed. Update the l_cet field when processing NT_GNU_PROPERTY_TYPE_0 note. Check multiple NT_GNU_PROPERTY_TYPE_0 notes. * sysdeps/x86/link_map.h (l_cet): Expand to 3 bits, Add lc_unknown.