about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Updates to trace2wl dj/mallocDJ Delorie2016-11-101-49/+236
| | | | | | | * command line option -p to show progress * command line option -f to use file-based buffers * reduced memory footprint * more 32/64-bit fixes
* More merge-related tweaksDJ Delorie2016-11-086-13/+36
| | | | | | | | | | | * add --enable-experimental-malloc/--disable-experimental-malloc (default: enabled) * syntax errors related to new lock macros * add some missing #if USE_TCACHE pairs * Undo test tweak to environment variable scanner
* Merge branch 'master' into dj/mallocDJ Delorie2016-11-081201-18196/+28843
|\
| * Consolidate lseek/lseek64/llseek implementationsAdhemerval Zanella2016-11-0813-111/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates all Linux lseek/lseek64/llseek implementation in on on sysdeps/unix/sysv/linux/lseek{64}.c. It also removes the llseek file and instead consolidate the LFS lseek implementation on lseek64.c as for other LFS symbols implementations. The general idea is: - lseek: ABIs that not define __OFF_T_MATCHES_OFF64_T will preferable use __NR__llseek if kernel supports it, otherwise they will use __NR_lseek. ABIs that defines __OFF_T_MATCHES_OFF64_T won't produce any symbol. - lseek64: ABIs with __OFF_T_MATCHES_OFF64_T will preferable use __NR_lseek (since it will use 64-bit arguments without low/high splitting) and __NR__llseek if __NR_lseek is not defined (for some ILP32 ports). - llseek: files will be removed and symbols will be aliased ot lseek64. ABI without __OFF_T_MATCHES_OFF64_T and without __NR_llseek (basically MIPS64n32 so far) are covered by building lseek with off_t as expected and lseek64 using __NR_lseek (as expected for off64_t being passed using 64-bit registers). For this consolidation I mantained the x32 assembly specific implementation because to correctly fix this it would required both the x32 fix for {INLINE,INTERNAL}_SYSCALL [1] and a wrapper to correctly subscribe it to return 64 bits instead of default 32 bits (as for times). It could a future cleanup. It is based on my previous {INTERNAL,INLINE}_SYSCALL_CALL macro [2], although it is mainly for simplification. Tested on x86_64, i686, aarch64, armhf, and powerpc64le. * nptl/Makefile (libpthread-routines): Remove ptw-llseek and add ptw-lseek64. * sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Remove llseek. * sysdeps/unix/sysv/linux/alpha/Makefile (sysdeps_routines): Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c: Remove file. * sysdeps/unix/sysv/linux/generic/wordsize-32/lseek.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips64/llseek.c: Likewise. * sysdeps/unix/sysv/linux/llseek.c: Remove file. * sysdeps/unix/sysv/linux/lseek.c: New file. * sysdeps/unix/sysv/linux/lseek64.c: Add default Linux implementation. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove lseek and __libc_lseek64 from auto-generation. * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/lseek64.S: New file. [1] https://sourceware.org/ml/libc-alpha/2016-08/msg00443.html [2] https://sourceware.org/ml/libc-alpha/2016-08/msg00646.html
| * Write messages to stdout and use write_message instead of writeGabriel F. T. Gomes2016-11-079-54/+70
| | | | | | | | | | | | Replaces calls to write on file descriptor 2 with calls to write_message, which writes to STDOUT_FILENO (1) and properly deals with the return of write.
| * Use write_message instead of writeGabriel F. T. Gomes2016-11-075-26/+37
| | | | | | | | | | | | | | | | In the test cases, there are writes to stdout which do not check the result value. This patch replaces such occurrences with calls to write_message, which properly deals with the unused result. Tested for powerpc64le.
| * Make check-installed-headers.sh ignore sys/sysctl.h for x32.Joseph Myers2016-11-072-0/+27
| | | | | | | | | | | | | | | | | | | | | | check-installed-headers tests were failing for x32 because of the x86 bits/sysctl.h containing a #error for x32. This patch makes the tests ignore sys/sysctl.h for x32, similar to the other special-casing of particular headers. Tested for x86_64 (full testing for -m64, compile-only for x32). * scripts/check-installed-headers.sh: Ignore sys/sysctl.h for x32.
| * Define __ASSUME_ST_INO_64_BIT on all platforms.Steve Ellcey2016-11-077-4/+18
| | | | | | | | | | | | | | | | | | | | | | * sysdeps/unix/sysv/linux/alpha/kernel-features.h: #define __ASSUME_ST_INO_64_BIT as 0 * sysdeps/unix/sysv/linux/sh/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/fxstat64.c: Replace #ifdef with #if over the code where __ASSUME_ST_INO_64_BIT is used. * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. * sysdeps/unix/sysv/linux/xstat64.c: Likewise. * sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
| * nptl: Document the reason why __kind in pthread_mutex_t is part of the ABIFlorian Weimer2016-11-0716-14/+49
| |
| * Document do_test in test-skeleton.cSteve Ellcey2016-11-072-1/+20
| | | | | | | | * test-skeleton.c: Document do_test usage.
| * gconv.h: fix build with GCC 7Aurelien Jarno2016-11-062-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gconv.h is using a flex array to define the __gconv_info member in an invalid way, causing GCC 7 to issue an error: | In file included from ../include/gconv.h:1:0, | from ../sysdeps/unix/sysv/linux/_G_config.h:32, | from ../libio/libio.h:31, | from ../include/libio.h:4, | from ../libio/stdio.h:74, | from ../include/stdio.h:5, | from test-math-isinff.cc:22: | ../iconv/gconv.h:142:50: error: flexible array member '__gconv_info::__data' not at end of 'struct _IO_codecvt' | In file included from ../include/libio.h:4:0, | from ../libio/stdio.h:74, | from ../include/stdio.h:5, | from test-math-isinff.cc:22: | ../libio/libio.h:211:14: note: next member '_G_iconv_t _IO_codecvt::__cd_out' declared here | ../libio/libio.h:187:8: note: in the definition of 'struct _IO_codecvt' | In file included from ../include/gconv.h:1:0, | from ../sysdeps/unix/sysv/linux/_G_config.h:32, | from ../libio/libio.h:31, | from ../include/libio.h:4, | from ../libio/stdio.h:74, | from ../include/stdio.h:5, | from test-math-isinff.cc:22: | ../iconv/gconv.h:142:50: error: flexible array member '__gconv_info::__data' not at end of 'struct _IO_wide_data' | In file included from ../include/libio.h:4:0, | from ../libio/stdio.h:74, | from ../include/stdio.h:5, | from test-math-isinff.cc:22: | ../libio/libio.h:211:14: note: next member '_G_iconv_t _IO_codecvt::__cd_out' declared here | ../libio/libio.h:215:8: note: in the definition of 'struct _IO_wide_data' This is basically a revert to the code from 15 years ago. More details are available in the GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78039 Changelog: * iconv/gconv.h (__gconv_info): Define __data element using a zero-length array.
| * Speed up math/test-tgmath2.cSteve Ellcey2016-11-042-9/+126
| | | | | | | | * math/test-tgmath2.c: Split up test function.
| * Do not generate UNRESOLVED results for run-built-tests = no.Joseph Myers2016-11-042-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing with run-built-tests = no generates many UNRESOLVED results in tests.sum (and so in the output of "make check"), for all the tests that are only compiled and not run in such a configuration. This doesn't seem useful in the "make check" output, and also causes "make check" to exist with error status even when all tests that can be run in such a configuration passed. This patch changes it not to consider those tests when generating subdir-tests.sum, and so tests.sum, so that you get a smaller number of tests considered in the final results rather than a huge pile of UNRESOLVED. Tested with a cross-compiler to ARM in a run-built-tests = no configuration. * Rules (tests-expected): New variable, depending on $(run-built-tests). (tests): Pass $(tests-expected) to merge-test-results.sh, not $(tests).
| * Handle tests-unsupported if run-built-tests = no.Joseph Myers2016-11-042-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests-unsupported variable lists tests that should neither be compiled nor run, because some support needed to compile them is missing. The implementation of this feature involves having a rule to create .out files for these tests that takes precedence over the default rule. This does not work in the run-built-tests = no case (cross compiling without use of a wrapper to run the tests on a separate system, in which cases most tests are compiled only) because in that case the tests target depends on $(tests) to ensure all tests get compiled. This patch changes that dependency to filter out $(tests-unsupported). Tested with cross-compilation to ARM with GCC 5, where libstdc++ is missing some C++11 support because of the bug I fixed in <https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01040.html> and so tests-unsupported is nonempty and the tests in question fail to compile. (When I originally observed the bug, it was with a native build / test simply using an x86_64 compiler that had been configured as a cross compiler to isolate it from the system headers / libraries, so the configuration issue applied to the compiler but run-built-tests was yes, so I don't observe the issue with tests-unsupported with that compiler.) * Rules [$(run-built-tests) = no] (tests): Do not depend on $(tests-unsupported).
| * Fix sparc build due missing __WORDSIZE_TIME64_COMPAT32 definitionAdhemerval Zanella2016-11-042-0/+7
| | | | | | | | | | | | | | | | | | | | | | This patch adds the missing Linux sparc definitions from d060cd0. Both value are copied from default sparc value [1] and with this fix now both sparc 32 and 64 bits builds on Linux. * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h (__WORDSIZE_TIME64_COMPAT32): Define for both 32 and 64 bits. [1] sysdeps/sparc/sparc{32,64}/bits/wordsize.h
| * Fix alpha sqrt fegetenv namespace (bug 20768).Joseph Myers2016-11-042-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On alpha, sqrt (a C90 function) brings in references to fegetenv (C99), resulting in linknamespace test failures: [initial] __sqrt -> [libm.a(w_sqrt.o)] __ieee754_sqrt -> [libm.a(e_sqrt.o)] __feholdexcept -> [libm.a(feholdexcpt.o)] fegetenv This patch fixes this by making __feholdexcept call __fegetenv instead of fegetenv. Tested for Alpha (compilation only). [BZ #20768] * sysdeps/alpha/fpu/feholdexcpt.c (__feholdexcept): Call __fegetenv instead of fegetenv.
| * Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139).Joseph Myers2016-11-0423-30/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | manual/libm-err-tab.pl hardcodes a list of names for particular platforms (mapping from sysdeps directory name to friendly name for the manual). This goes against the principle of keeping information about individual platforms in their corresponding sysdeps directory, and the list is also very out-of-date regarding supported platforms and their corresponding sysdeps directories. This patch fixes this by adding a libm-test-ulps-name file alongside each libm-test-ulps file. The script then gets the friendly name from that file, which is required to exist, so it no longer needs to allow for the mapping being missing. Tested for x86_64. [BZ #14139] * manual/libm-err-tab.pl (%pplatforms): Initialize to empty. (find_files): Obtain platform name from libm-test-ulps-name and store in %pplatforms. (canonicalize_platform): Remove. (print_platforms): Use $pplatforms directly. (by_platforms): Do not allow for platforms missing from %pplatforms. * sysdeps/aarch64/libm-test-ulps-name: New file. * sysdeps/alpha/fpu/libm-test-ulps-name: Likewise. * sysdeps/arm/libm-test-ulps-name: Likewise. * sysdeps/generic/libm-test-ulps-name: Likewise. * sysdeps/hppa/fpu/libm-test-ulps-name: Likewise. * sysdeps/i386/fpu/libm-test-ulps-name: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps-name: Likewise. * sysdeps/ia64/fpu/libm-test-ulps-name: Likewise. * sysdeps/m68k/coldfire/fpu/libm-test-ulps-name: Likewise. * sysdeps/m68k/m680x0/fpu/libm-test-ulps-name: Likewise. * sysdeps/microblaze/libm-test-ulps-name: Likewise. * sysdeps/mips/mips32/libm-test-ulps-name: Likewise. * sysdeps/mips/mips64/libm-test-ulps-name: Likewise. * sysdeps/nios2/libm-test-ulps-name: Likewise. * sysdeps/powerpc/fpu/libm-test-ulps-name: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps-name: Likewise. * sysdeps/s390/fpu/libm-test-ulps-name: Likewise. * sysdeps/sh/libm-test-ulps-name: Likewise. * sysdeps/sparc/fpu/libm-test-ulps-name: Likewise. * sysdeps/tile/libm-test-ulps-name: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps-name: Likewise.
| * Make MIPS <sys/user.h> self-contained.Joseph Myers2016-11-042-0/+3
| | | | | | | | | | | | | | | | | | | | | | The check-installed-headers tests show up that the MIPS <sys/user.h> is not self-contained, using size_t without including any header that defines it. This patch fixes it by including <stddef.h>, as done for other architectures' versions of this header. Tested for MIPS (all 24 ABIs, compilation only). * sysdeps/unix/sysv/linux/mips/sys/user.h: Include <stddef.h>.
| * XFAIL check-execstack for MIPS.Joseph Myers2016-11-042-0/+9
| | | | | | | | | | | | | | | | | | | | | | This patch marks the check-execstack test as expected to fail for MIPS, with a comment referencing previous RFC discussion of the changes that would be needed to support non-executable stacks on MIPS. Tested for MIPS (all 24 ABIs). * sysdeps/unix/sysv/linux/mips/Makefile [$(subdir) = elf] (test-xfail-check-execstack): New variable.
| * Add localplt.data for MIPS.Joseph Myers2016-11-042-0/+7
| | | | | | | | | | | | | | | | | | | | | | This patch adds a localplt.data file for MIPS, reflecting the peculiarities of MIPS ELF that mean this test cannot detect PLT entries (there aren't any in shared libraries), not GOT entries (because of the implicit relocation). Tested for MIPS (all 24 ABIs). * sysdeps/mips/localplt.data: New file.
| * Define wordsize.h macros everywhereSteve Ellcey2016-11-0421-10/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bits/wordsize.h: Add documentation. * sysdeps/aarch64/bits/wordsize.h : New file * sysdeps/generic/stdint.h (PTRDIFF_MIN, PTRDIFF_MAX): Update definitions. (SIZE_MAX): Change ifdef to if in __WORDSIZE32_SIZE_ULONG check. * sysdeps/gnu/bits/utmp.h (__WORDSIZE_TIME64_COMPAT32): Check with #if instead of #ifdef. * sysdeps/gnu/bits/utmpx.h (__WORDSIZE_TIME64_COMPAT32): Ditto. * sysdeps/mips/bits/wordsize.h (__WORDSIZE32_SIZE_ULONG, __WORDSIZE32_PTRDIFF_LONG, __WORDSIZE_TIME64_COMPAT32): Add or change defines. * sysdeps/powerpc/powerpc32/bits/wordsize.h: Likewise. * sysdeps/powerpc/powerpc64/bits/wordsize.h: Likewise. * sysdeps/s390/s390-32/bits/wordsize.h: Likewise. * sysdeps/s390/s390-64/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc32/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc64/bits/wordsize.h: Likewise. * sysdeps/tile/tilegx/bits/wordsize.h: Likewise. * sysdeps/tile/tilepro/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h: Likewise. * sysdeps/wordsize-32/bits/wordsize.h: Likewise. * sysdeps/wordsize-64/bits/wordsize.h: Likewise. * sysdeps/x86/bits/wordsize.h: Likewise.
| * An optimized memchr was missing for AArch64. This version is similar toWilco Dijkstra2016-11-042-0/+162
| | | | | | | | | | | | | | | | | | strchr and is significantly faster than the C version. 2016-11-04 Wilco Dijkstra <wdijkstr@arm.com> Kevin Petit <kevin.petit@arm.com> * sysdeps/aarch64/memchr.S (__memchr): New file.
| * Handle tilegx* machine names.Joseph Myers2016-11-042-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes sysdeps/tile/preconfigure handle tilegx* machine names instead of just plain tilegx. That matches GCC, and in particular allows a big-endian toolchain to use the tilegxbe-linux-gnu name when configuring both GCC and glibc. Tested with compilation for tilegxbe-linux-gnu, both 32-bit and 64-bit (building a subsequent GCC against that glibc still falls over because of both 32-bit and 64-bit libraries going in the lib directory, as noted at <https://sourceware.org/ml/libc-alpha/2016-11/msg00129.html>). * sysdeps/tile/preconfigure: Accept tilegx* instead of tilegx.
| * Fix linknamespace parallel test failures.Joseph Myers2016-11-032-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Having found that with my script to build many glibc variants I could reproduce the linknamespace test failures in parallel builds (that various people had previously reported but I hadn't seen myself), I investigated those failures further. This patch adds a missing dependency to those tests. Tested for x86_64, including the configuration where I saw those failures and where I don't see them with this patch. * conform/Makefile ($(linknamespace-header-tests)): Also depend on $(linknamespace-symlists-tests).
| * Fix -Wformat-length warning in time/tst-strptime2.cSteve Ellcey2016-11-022-0/+15
| | | | | | | | * time/tst-strptime2.c: Ignore -Wformat-length warning.
| * Bug 20729: Fix build failures on ppc64 and other arches.Carlos O'Donell2016-11-022-2/+10
| | | | | | | | | | | | | | | | The changes to fix bug 20729 introduced an error which removed an ignore diagnostic from -O2 by using the new -Os related macro. This broke ppc64 builds. This commit fixes the mistake. Tested on x86, x86_64, ppc64, ppc64le, arm, aarch64, and s390x.
| * Fix warning from latest GCC in tst-printf.cSteve Ellcey2016-11-012-0/+9
| | | | | | | | * stdio-common/tst-printf.c: Ignore -Wformat-length warning.
| * Correct clog10 documentation (bug 19673).Joseph Myers2016-11-012-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 19673 reports that the documentation of clog10 is incorrect, both failing to include the division by log (10) in the imaginary part and, in the non-TeX version of the equation only, describing the LHS as log rather than log10. This patch fixes both issues. Note: I think it's appropriate that the LHS says log10 not clog10, and that the cexp and clog descriptions referred to in a comment in that bug report similarly say exp and log; this is a mathematical description not a literal C one. Tested for x86_64. [BZ #19673] * manual/math.texi (Exponents and Logarithms): Correct description of clog10.
| * Bug 20729: Include libc-internal.h where required.Carlos O'Donell2016-10-314-1/+13
| | | | | | | | | | | | | | | | | | The original fix for bug 20729 failed to include libc-internal.h in the files that needed them and this caused build failures on machines that don't implicitly include this header. This commit fixes that by following the consensus rule that a header, if needed, should always be directly included.
| * hurd: Fix spurious port deallocationBrent W. Baccala2016-10-312-1/+7
| | | | | | | | | | * sysdeps/mach/hurd/dl-sysdep.c (__mmap): Do not deallocate memobj_wr when it is MACH_PORT_NULL.
| * Properly initialize glob structure with GLOB_BRACE|GLOB_DOOFFS (bug 20707)Andreas Schwab2016-10-313-39/+50
| |
| * Bug 20729: Fix building with -Os.Carlos O'Donell2016-10-298-1/+91
| | | | | | | | | | | | | | | | | | | | This commit adds a new DIAG_IGNORE_Os_NEEDS_COMMENT which is only enabled when compiling with -Os. This allows developers working on -Os enabled builds to mark false-positive warnings without impacting the warnings emitted at -O2. Then using the new DIAG_IGNORE_Os_NEEDS_COMMENT we fix 6 warnings generated with GCC 5 to get -Os builds working again.
| * Add include/crypt.h.Carlos O'Donell2016-10-283-1/+8
| | | | | | | | To support tests that include crypt.h we add a wrapper.
| * Fix warning caused by unused-result in bug-atexit3-lib.ccGabriel F T Gomes2016-10-282-2/+16
| | | | | | | | | | | | | | | | | | The test case dlfcn/bug-atexit3-lib.cc calls write and doesn't check the result. When building with GCC 6.2, this generates a warning in 'make check', which is treated as an error. This patch replaces the call to write with a call to write_message. Tested for powerpc64le.
| * Add SNAN, SNANF, SNANL macros.Joseph Myers2016-10-288-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TS 18661-1 defines SNAN macros for signaling NaN values, suitable for use in static initializers. This patch adds them to glibc's <math.h> (provided you are building with GCC 3.3 or later; no attempt is made to provide any kind of nonconforming fallback for older compilers without the __builtin_nans functions). Tested for x86_64 and x86. * math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT) && __GNUC_PREREQ (3, 3)] (SNANF): New macro. [__GLIBC_USE (IEC_60559_BFP_EXT) && __GNUC_PREREQ (3, 3)] (SNAN): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT) && __GNUC_PREREQ (3, 3)] (SNANL): Likewise. * manual/arith.texi (Infinity and NaN): Document SNANF, SNAN and SNANL. * math/test-double.h (snan_value_MACRO): New macro. * math/test-float.h (snan_value_MACRO): Likewise. * math/test-ldouble.h (snan_value_MACRO): Likewise. * math/libm-test.inc (issignaling_test_data): Add tests of snan_value_MACRO.
| * Document a behavior of an elided pthread_rwlock_unlockTulio Magno Quites Machado Filho2016-10-283-0/+13
| | | | | | | | | | Explain that pthread_rwlock_unlock may crash if called on a lock not held by the current thread.
| * powerpc: Fix TOC stub on powerpc64 clone()Tulio Magno Quites Machado Filho2016-10-282-1/+7
| | | | | | | | | | | | | | Use a function call to _exit() so that the linker can create a TOC stub instead of just a branch. Tested on powerpc64.
| * malloc: Update comments about chunk layoutFlorian Weimer2016-10-282-10/+35
| |
| * crypt: Use internal names for the SHA-2 block functionsFlorian Weimer2016-10-287-30/+42
| | | | | | | | | | These functions are externally visible with a static libcrypt library.
| * Fix building tst-linkall-static.Carlos O'Donell2016-10-282-0/+3
| | | | | | | | | | The crypt/ directory is not added as part of the sysdep directories. Add it when building tst-linkall-static to include crypt.h.
| * Add missing include for stdlib.h.Carlos O'Donell2016-10-282-0/+5
| | | | | | | | | | | | | | | | | | | | The test math/test-nan-overflow uses malloc without including stdlib.h. On -Os builds for i486 the header inclusion order is altered enough that the test fails to build because of the warning which is turned into an error. The obvious fix is to include stdlib.h since malloc is being used directly.
| * Check IFUNC definition in unrelocated shared library [BZ #20019]H.J. Lu2016-10-283-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | Calling an IFUNC function defined in unrelocated shared library may lead to segfault. This patch issues an error message to request relinking the shared library if it references IFUNC function defined in the unrelocated shared library. [BZ #20019] * sysdeps/i386/dl-machine.h (elf_machine_rel): Check IFUNC definition in unrelocated shared library. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
| * i386: Support CFLAGS which imply -fno-omit-frame-pointer [BZ #20729]Florian Weimer2016-10-282-12/+59
| |
| * Add test for linking against most static librariesFlorian Weimer2016-10-283-1/+63
| |
| * sysmalloc: Initialize previous size field of mmaped chunksFlorian Weimer2016-10-282-0/+6
| | | | | | | | | | With different encodings of the header, the previous zero initialization may be insufficient and produce an invalid encoding.
| * malloc: Use accessors for chunk metadata accessFlorian Weimer2016-10-284-70/+127
| | | | | | | | | | This change allows us to change the encoding of these struct members in a centralized fashion.
| * Make strtod raise "inexact" exceptions (bug 19380).Joseph Myers2016-10-285-18/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strtod function should raise the "inexact" exception when its result is inexact, but fails to do so except in the case of underflow or overflow. This patch fixes it to do so for all inexact results. tst-strtod-round is extended to test for this exception; the generator is fixed to properly mark inexact results as such in the case where the inexactness is from the mpfr_subnormalize step. Tested for x86_64, x86 and powerpc. [BZ #19380] * stdlib/strtod_l.c (round_and_return): Force "inexact" exception for inexact results. * stdlib/gen-tst-strtod-round.c (string_to_fp): Return indication of inexact result where mpfr_subnormalize is the only inexact step. * stdlib/tst-strtod-round-data.h: Regenerated. * stdlib/tst-strtod-round-skeleton.c [!FE_INEXACT] (FE_INEXACT): Define to 0. (GEN_ONE_TEST): Test inexact exceptions raised are as expected.
| * Fix a sparc header conformtest failure.David S. Miller2016-10-272-0/+6
| | | | | | | | * sysdeps/unix/sysv/linux/sparc/sys/user.h: Include stddef.h
| * Static inline functions for mallopt helpersSiddhesh Poyarekar2016-10-272-34/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make mallopt helper functions for each mallopt parameter so that it can be called consistently in other areas, like setting tunables. * malloc/malloc.c (do_set_mallopt_check): New function. (do_set_mmap_threshold): Likewise. (do_set_mmaps_max): Likewise. (do_set_top_pad): Likewise. (do_set_perturb_byte): Likewise. (do_set_trim_threshold): Likewise. (do_set_arena_max): Likewise. (do_set_arena_test): Likewise. (__libc_mallopt): Use them.
| * Add canonicalize, canonicalizef, canonicalizel.Joseph Myers2016-10-2649-26/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TS 18661-1 defines canonicalize functions to produce a canonical version of a floating-point representation. This patch implements these functions for glibc. As with the iscanonical macro, these functions are oriented to the decimal floating-point case, where some values have both canonical and noncanonical representations. However, the functions have a return value that says whether they succeeded in storing a canonical result; thus, they can fail for the case of an invalid representation (while still not making any particular choice from among multiple equally canonical valid representations of the same value). Since no floating-point formats in glibc actually have noncanonical valid representations, a type-generic implementation of these functions can be used that expects iscanonical to return 0 only for invalid representations. Now that iscanonical is used within libm.so, libm_hidden_proto / libm_hidden_def are added for __iscanonicall. The definition of these functions is intended to correspond to a convertFormat operation to the same floating-point format. Thus, they convert signaling NaNs to quiet NaNs, raising the "invalid" exception. Such a conversion "should" produce "the canonical version of that signaling NaN made quiet". libm-test.inc is made to check NaN payloads for the output of these functions, a new feature (at some point manipulation functions such as fabs and copysign should have tests added that verify payload preservation for them). As however some architectures may not follow the recommended practice of preserving NaN payloads when converting a signaling NaN to quiet, a new math-tests.h macro SNAN_TESTS_PRESERVE_PAYLOAD is added, and defined to 0 for non-NAN2008 MIPS; any other architectures seeing test failures for lack of payload preservation in this case should also define this macro to 0. (If any cases arise where the sign isn't preserved either, those should have a similar macro added.) The ldbl-96 and ldbl-128ibm tests of iscanonical are renamed and adapted to test canonicalizel as well on the same representations. Tested for x86_64, x86, mips64 and powerpc. * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (canonicalize): New declaration. * math/Versions (canonicalize): New libm symbol at version GLIBC_2.25. (canonicalizef): Likewise. (canonicalizel): Likewise. * math/Makefile (gen-libm-calls): Add s_canonicalizeF. * math/s_canonicalize_template.c: New file. * math/libm-test.inc: Update comment on functions tested and testing of NaN payloads. (TEST_NAN_PAYLOAD): New macro. (NO_TEST_INLINE): Update value. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (TEST_NAN_PAYLOAD_CANONICALIZE): New macro. (check_float_internal): Check NaN payloads if TEST_NAN_PAYLOAD. (struct test_Ffp_b1_data): New type. (RUN_TEST_Ffp_b1): New macro. (RUN_TEST_LOOP_Ffp_b1): Likewise. (canonicalize_test_data): New array. (canonicalize_test): New function. (main): Call canonicalize_test. * manual/arith.texi (FP Bit Twiddling): Document canonicalize, canonicalizef and canonicalizel. * manual/libm-err-tab.pl: Update comment on interfaces without ulps tabulated. * sysdeps/ieee754/ldbl-opt/nldbl-canonicalize.c: New file. * sysdeps/ieee754/ldbl-opt/s_canonicalizel.c: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add canonicalize. (CFLAGS-nldbl-canonicalize.c): New variable. * sysdeps/ieee754/ldbl-128ibm/test-iscanonical-ldbl-128ibm.c: Move to ... * sysdeps/ieee754/ldbl-128ibm/test-canonical-ldbl-128ibm.c: ... here. (do_test): Also test canonicalizel. * sysdeps/ieee754/ldbl-128ibm/Makefile (tests): Change test-iscanonical-ldbl-128ibm to test-canonical-ldbl-128ibm. * sysdeps/ieee754/ldbl-128ibm/include/bits/iscanonical.h: New file. * sysdeps/ieee754/ldbl-128ibm/s_iscanonicall.c (__iscanonicall): Use libm_hidden_def. * sysdeps/ieee754/ldbl-96/test-iscanonical-ldbl-96.c: Move to ... * sysdeps/ieee754/ldbl-96/test-canonical-ldbl-96.c: ... here. (do_test): Also test canonicalizel. * sysdeps/ieee754/ldbl-96/Makefile (tests): Change test-iscanonical-ldbl-96 to test-canonical-ldbl-96. * sysdeps/ieee754/ldbl-96/include/bits/iscanonical.h: New file. * sysdeps/ieee754/ldbl-96/s_iscanonicall.c (__iscanonicall): Use libm_hidden_def. * sysdeps/generic/math-tests.h (SNAN_TESTS_PRESERVE_PAYLOAD): New macro. * sysdeps/mips/math-tests.h [__mips_hard_float && !__mips_nan2008] (SNAN_TESTS_PRESERVE_PAYLOAD): Likewise. * sysdeps/nacl/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.