summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-18Add comments about non-Linux use of bits/mman-linux.h.Roland McGrath
2014-03-18Move bits/mman-linux.h out of sysdeps/unix/sysv/linux/.Roland McGrath
This way, non-Linux ports using the Linux values for bits/mman.h constants need not duplicate the header.
2014-03-18Add stardard definition on conform processingAdhemerval Zanella
This patch adds the -std=c99 option when preprocessing the data files from the conform testcases. It fixes an issue where the compiler may split the 'macro bool' defition from stdbool.h-data in two lines and thus breaking the conform script.
2014-03-18Test scalbn and scalbln in all rounding modes, add more tests of negative ↵Joseph Myers
arguments. Continuing the move to systematically testing libm functions in all rounding modes with ALL_RM_TEST, this patch converts the tests of scalbn and scalbln to use that macro. Those tests include cases of underflow and overflow, meaning the expected results depend on the rounding mode. For convenience in writing such tests manually, the patch adds the notation plus_oflow, minus_oflow, plus_uflow and minus_uflow for overflowing / underflowing results of each sign appropriate to the rounding mode being used, and gen-libm-test.pl is made to substitute in the appropriate values. The tests of underflow and overflow are extended to include negative arguments to provide better coverage (otherwise minus_oflow and minus_uflow wouldn't have been used at all). (A subsequent patch will make ldexp use the scalbn tests, as those functions are equivalent for binary floating point.) Tested x86_64 and x86. * math/gen-libm-test.pl (parse_args): Handle plus_oflow, minus_oflow, plus_uflow and minus_uflow in expected results. * math/libm-test.inc (scalbn_test_data): Add more tests of negative arguments. Use plus_oflow, minus_oflow, plus_uflow and minus_uflow. (scalbn_test): Use ALL_RM_TEST. (scalbln_test_data): Add more tests of negative arguments. Use plus_oflow, minus_oflow, plus_uflow and minus_uflow. (scalbln_test): Use ALL_RM_TEST.
2014-03-18Work around binutils bugs in 2.23 and olderRoland McGrath
binutils versions up through at least 2.23 have some bugs that cause STV_HIDDEN symbols to appear in .dynsyms.
2014-03-18misc/sys/xattr.h: guard against linux uapi header inclusionSerge Hallyn
If the glibc xattr.h header is included after the uapi header, compilation fails due to an enum re-using a #define from the uapi header. Protect against this by guarding the define and enum inclusions against each other. (A corresponding kernel patch has been sent here: http://lkml.org/lkml/2014/3/7/331 ) (See https://lists.debian.org/debian-glibc/2014/03/msg00029.html and https://sourceware.org/glibc/wiki/Synchronizing_Headers for more information.) Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-03-18aarch64: Remove inaccurate comment from sysdep.hWill Newton
This comment appears to have been copied from the ARM port where it makes more sense. 2014-03-18 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Remove inaccurate comment.
2014-03-18Exit with error status on check-abi failure.Joseph Myers
* Makerules [!subdir] (check-abi): Exit with error status if a test failed.
2014-03-17Test rint and nearbyint with same inputs, in all rounding modes.Joseph Myers
This patch arranges for rint and nearbyint to be tested by libm-test.inc with the same inputs (previously each had some test inputs the other didn't, although there was a lot of overlap as well), and for nearbyint to be tested in all rounding modes where previously it was only tested in round-to-nearest mode. The expected results are the same for each function, except that rint is expected to have "inexact" exceptions for non-integer input and nearbyint is expected not to have those exceptions. Tested x86_64 and x86. * math/libm-test.inc (nearbyint_test_data): Include all tests used for rint. Include results for all rounding modes. (nearbyint_test): Use ALL_RM_TEST. (rint_test_data): Include all tests used for nearbyint.
2014-03-17Revert "Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning"Will Newton
This reverts commit 788bba368c2eaf8aa3fd2ca18d269395d6bc8afb.
2014-03-17Revert "Fix HP_SMALL_TIMING_AVAIL -Wundef warnings"Will Newton
This reverts commit 53f1bed39263541ef7f3d86f9701005524938016.
2014-03-17Revert "Fix _IO_JUMPS_OFFSET -Wundef warnings"Will Newton
This reverts commit f7efd7c3dfffa3c417e9d3c4cb19d9954a3b1421.
2014-03-17Revert "Fix HAVE_RM_CTX -Wundef warnings"Will Newton
This reverts commit 9290130a8de3f30970f741c79dfe8459f798e05f.
2014-03-17Fix HAVE_RM_CTX -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * sysdeps/generic/math_private.h: Check whether HAVE_RM_CTX is defined with #ifdef rather than #if.
2014-03-17Fix __STRICT_ANSI__ -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * argp/argp-fmtstream.h: Check whether __STRICT_ANSI__ is defined with #ifdef rather than #if. * argp/argp.h: Likewise.
2014-03-17Fix _IO_JUMPS_OFFSET -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * libio/genops.c: Check whether _IO_JUMPS_OFFSET is defined with #ifdef rather than #if. * libio/libioP.h: Likewise. * stdio-common/vfprintf.c: Likewise.
2014-03-17Fix HP_SMALL_TIMING_AVAIL -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * sysdeps/generic/ldsodefs.h: Check whether HP_SMALL_TIMING_AVAIL is defined with #ifdef rather than #if.
2014-03-17Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warningWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * nptl/sysdeps/pthread/pthread.h: Check __PTHREAD_MUTEX_HAVE_ELISION is defined before testing its value.
2014-03-17Change offset in fdopen only if setting O_APPENDSiddhesh Poyarekar
fdopen should only be allowed to change the offset in the file it attaches to if it is setting O_APPEND. If O_APPEND is already set, it should not change the state of the handle.
2014-03-17Fix offset caching for streams and use it for ftell (BZ #16680)Siddhesh Poyarekar
The ftell implementation was made conservative to ensure that incorrectly cached offsets never affect it. However, this causes problems for append mode when a file stream is rewound. Additionally, the 'clever' trick of using stat to get position for append mode files caused more problems than it solved and broke old behavior. I have described the various problems that it caused and then finally the solution. For a and a+ mode files, rewinding the stream should result in ftell returning 0 as the offset, but the stat() trick caused it to (incorrectly) always return the end of file. Now I couldn't find anything in POSIX that specifies the stream position after rewind() for a file opened in 'a' mode, but for 'a+' mode it should be set to 0. For 'a' mode too, it probably makes sense to keep it set to 0 in the interest of retaining old behavior. The initial file position for append mode files is implementation defined, so the implementation could either retain the current file position or move the position to the end of file. The earlier ftell implementation would move the offset to end of file for append-only mode, but retain the old offset for a+ mode. It would also cache the offset (this detail is important). My patch broke this and would set the initial position to end of file for both append modes, thus breaking old behavior. I was ignorant enough to write an incorrect test case for it too. The Change: I have now brought back the behavior of seeking to end of file for append-only streams, but with a slight difference. I don't cache the offset though, since we would want ftell to query the current file position through lseek while the stream is not active. Since the offset is moved to the end of file, we can rely on the file position reported by lseek and we don't need to resort to the stat() nonsense. Finally, the cache is always reliable, except when there are unflished writes in an append mode stream (i.e. both a and a+). In the latter case, it is safe to just do an lseek to SEEK_END. The value can be safely cached too, since the file handle is already active at this point. Incidentally, this is the only state change we affect in the file handle (apart from taking locks of course). I have also updated the test case to correct my impression of the initial file position for a+ streams to the initial behavior. I have verified that this does not break any existing tests in the testsuite and also passes with the new tests.
2014-03-17Fix up return codes for tests in tst-ftell-active-handlerSiddhesh Poyarekar
The test functions used a variable ret to store failure codes for individual tests, but the variable was incorrectly used to record other failure codes too, resulting in overwriting of the tests status. This is now fixed by making sure that the ret variable is used only for recording test failures. * libio/tst-ftell-active-handler.c (do_ftell_test): Don't mix up test status with function return status. (do_write_test): Likewise. (do_append_test): Likewise.
2014-03-17Get rid of __LT_SPINLOCK_INITSiddhesh Poyarekar
We got rid of LinuxThreads in 2005, but we didn't remove __LT_SPINLOCK_INIT back then. Do it now. * nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc && !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]: Remove.
2014-03-17Add libm-test support for per-rounding-mode manually specified results.Joseph Myers
This patch continues the libm-test move towards automatic testing of all test inputs in all rounding modes by adding gen-libm-test.pl support for tests specifying results in each rounding mode manually. Previously a TEST_* line could specify arguments and results, or arguments, results and flags. Now there is the option of (arguments, results-rd, flags-rd, results-rn, flags-rn, results-rz, flags-rz, results-ru, flags-ru). This is used to replace the separate arrays of results in each rounding mode for lrint, llrint and rint. (In the case of rint, some tests were only in rint_test_data and needed to have expectations for non-default rounding modes added, which I did manually. In various cases there were slight differences in things such as the ordering of tests in the arrays for each mode.) Tested x86_64 and x86. * math/gen-libm-test.pl (parse_args): Handle results specified for each rounding mode separately. * math/libm-test.inc (lrint_test_data): Merge in per-rounding-mode tests and results from lrint_tonearest_test_data, lrint_towardzero_test_data, lrint_downward_test_data and lrint_upward_test_data. (lrint_test): Use ALL_RM_TEST. (lrint_tonearest_test_data): Remove. (lrint_test_tonearest): Likewise. (lrint_towardzero_test_data): Likewise. (lrint_test_towardzero): Likewise. (lrint_downward_test_data): Likewise. (lrint_test_downward): Likewise. (lrint_upward_test_data): Likewise. (lrint_test_upward): Likewise. (llrint_test_data): Merge in per-rounding-mode tests and results from llrint_tonearest_test_data, llrint_towardzero_test_data, llrint_downward_test_data and llrint_upward_test_data. (llrint_test): Use ALL_RM_TEST. (llrint_tonearest_test_data): Remove. (llrint_test_tonearest): Likewise. (llrint_towardzero_test_data): Likewise. (llrint_test_towardzero): Likewise. (llrint_downward_test_data): Likewise. (llrint_test_downward): Likewise. (llrint_upward_test_data): Likewise. (llrint_test_upward): Likewise. (rint_test_data): Merge in per-rounding-mode tests and results from rint_tonearest_test_data, rint_towardzero_test_data, rint_downward_test_data and rint_upward_test_data. Add per-rounding-mode results for tests not in those arrays. (rint_test): Use ALL_RM_TEST. (rint_tonearest_test_data): Remove. (rint_test_tonearest): Likewise. (rint_towardzero_test_data): Likewise. (rint_test_towardzero): Likewise. (rint_downward_test_data): Likewise. (rint_test_downward): Likewise. (rint_upward_test_data): Likewise. (rint_test_upward): Likewise. (main): Don't call removed functions.
2014-03-14Remove "Compiled on ..." crapola from version text.Roland McGrath
2014-03-14Do not terminate default test runs on test failure.Joseph Myers
This patch is an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00198.html> and <https://sourceware.org/ml/libc-alpha/2014-03/msg00180.html>. Normal practice for software testsuites is that rather than terminating immediately when a test fails, they continue running and report at the end on how many tests passed or failed. The principle behind the glibc testsuite stopping on failure was probably that the expected state is no failures and so any failure indicates a problem such as miscompilation. In practice, while this is fairly close to true for native testing on x86_64 and x86 (kernel bugs and race conditions can still cause intermittent failures), it's less likely to be the case on other platforms, and so people testing glibc run the testsuite with "make -k" and then examine the logs to determine whether the failures are what they expect to fail on that platform, possibly with some automation for the comparison. This patch switches the glibc testsuite to the normal convention of not stopping on failure - unless you use stop-on-test-failure=y, in which case it behaves essentially as it did before (and does not generate overall test summaries on failure). Instead, the summary tests.sum may contain tests that FAILed. At the end of the test run, any FAIL or ERROR lines from tests.sum are printed, and then it exits with error status if there were any such lines. In addition, build failures will also cause the test run to stop - this has the justification that those *do* indicate serious problems that should be promptly fixed and aren't generally hard to fix (but apart from that, avoiding the build stopping on those failures seems harder). Note that unlike the previous patches in this series, this *does* require people with automation around testing glibc to change their processes - either to start using tests.sum / xtests.sum to track failures and compare them with expectations (with or without also using "make -k" and examining "make" logs to identify build failures), or else to use stop-on-test-failure=y and ignore the new tests.sum / xtests.sum mechanism. (If all you check is the exit status from "make check", no changes are needed unless you want to avoid test runs continuing after the first failure.) Tested x86_64. * scripts/evaluate-test.sh: Handle fourth argument to determine whether test run should stop on failure. * Makeconfig (stop-on-test-failure): New variable. (evaluate-test): Pass fourth argument to evaluate-test.sh based on $(stop-on-test-failure). * Makefile (tests): Give a summary of results from testing and exit with failure status if they include an ERROR or FAIL. (xtests): Likewise. * manual/install.texi (Configuring and compiling): Mention stop-on-test-failure=y. * INSTALL: Regenerated.
2014-03-14Get rid of Versions.def source fileRoland McGrath
2014-03-14Compile with -Wundef.Roland McGrath
2014-03-14PowerPC: remove wrong roundl implementation for PowerPC64Adhemerval Zanella
The roundl assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_roundl.S) returns wrong results for some inputs where first double is a exact integer and the precision is determined by second long double. Checking on implementation comments and history, I am very confident the assembly implementation was based on a version before commit 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4). By just removing the implementation and make the build select sysdeps/ieee754/ldbl-128ibm/s_roundl.c instead fixes the failing math. This fixes 16707.
2014-03-14PowerPC: remove wrong nearbyintl implementation for PPC64Adhemerval Zanella
The nearbyintl assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S) returns wrong results for some inputs where first double is a exact integer and the precision is determined by second long double. Checking on implementation comments and history, I am very confident the assembly implementation was based on a version before commit 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4). By just removing the implementation and make the build select sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c instead fixes the failing math. Fixes BZ#16706.
2014-03-14PowerPC: remove wrong ceill implementation for PowerPC64Adhemerval Zanella
The ceill assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_ceill.S) returns wrong results for some inputs where first double is a exact integer and the precision is determined by second long double. Checking on implementation comments and history, I am very confident the assembly implementation was based on a version before commit 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4). By just removing the implementation and make the build select sysdeps/ieee754/ldbl-128ibm/s_ceill.c instead fixes the failing math. Fixes BZ#16701.
2014-03-14Add truncl tests related to BZ#16414Adhemerval Zanella
2014-03-14Fix two stray cases using #ifdef vs #if for TLS_TCB_AT_TP.Roland McGrath
2014-03-14Check AVX-512 assembler support firstH.J. Lu
It checks AVX-512 assembler support first and sets libc_cv_cc_avx512 to $libc_cv_asm_avx512, instead of yes. GCC won't support AVX-512 if assembler doesn't support it. * sysdeps/x86_64/configure.ac: Check AVX-512 assembler support first. Disable AVX-512 GCC support if assembler doesn't support it. * sysdeps/x86_64/configure: Regenerated.
2014-03-13hppa: Add _STACK_GROWS_* cases to pthread_attr_[sg]etstack.Carlos O'Donell
This is one of a several NPTL patches to build glibc on hppa. The pthread_attr_[sg]etstack functions are defined by POSIX as taking a stackaddr that is the lowest addressable byte of the storage used for the stack. However, the internal iattr variable of the same name in NPTL is actually the final stack address as usable in the stack pointer for the machine. Therefore the NPTL implementation must add and subtract stacksize for _STACK_GROWS_DOWN architectures. HPPA is a _STACK_GROWS_UP architecture and doesn't need to add or subtract anything, the stack address *is* the lowest addressable byte of the storage. Tested on hppa-linux-gnu, with no regressions. Can't impact any other targets because of the conditionals. If nobody objects I'll check this in at the end of the week. I can't see there being any objections to this patch except that it introduces more code to maintain for an old architecture (perhaps we'll get another _S_G_U target in the future?).
2014-03-13stop supporting bash-1.xMike Frysinger
We've stopped supporting toolchain packages older than 2009, so punting bash-1.x is reasonable when bash-2 was released almost 20 years ago.
2014-03-13delete ksh checksMike Frysinger
Nothing in the tree uses ksh anymore, so punt these checks.
2014-03-13sotruss: drop ksh support and add basic POSIX shell supportMike Frysinger
This script works fine under bash as-is, so we don't need ksh anymore. Once we tweak the function style, the code even works (for the most part) under a POSIX shell. The localized strings will be prepended with a $, but it is otherwise functional.
2014-03-13manual: time: fix typo in IST exampleMike Frysinger
The current description says Tuesday when it meant to say Thursday (since that comes before Friday).
2014-03-13tst-longjmp_chk2: add comments/sanity checkMike Frysinger
If the longjmp checking code is slightly broken, this code can loop forever which isn't too helpful. Add a sanity check to keep that from happening. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-03-13Save and restore AVX-512 zmm registers to x86-64 ld.soIgor Zamyatin
AVX-512 ISA adds 512-bit zmm registers. This patch updates _dl_runtime_profile to pass zmm registers to run-time audit. It also changes _dl_x86_64_save_sse and _dl_x86_64_restore_sse to upport zmm registers, which are called when only when RTLD_PREPARE_FOREIGN_CALL is used. Its performance impact is minimum. * config.h.in (HAVE_AVX512_SUPPORT): New #undef. (HAVE_AVX512_ASM_SUPPORT): Likewise. * sysdeps/x86_64/bits/link.h (La_x86_64_zmm): New. (La_x86_64_vector): Add zmm. * sysdeps/x86_64/Makefile (tests): Add tst-audit10. (modules-names): Add tst-auditmod10a and tst-auditmod10b. ($(objpfx)tst-audit10): New target. ($(objpfx)tst-audit10.out): Likewise. (tst-audit10-ENV): New. (AVX512-CFLAGS): Likewise. (CFLAGS-tst-audit10.c): Likewise. (CFLAGS-tst-auditmod10a.c): Likewise. (CFLAGS-tst-auditmod10b.c): Likewise. * sysdeps/x86_64/configure.ac: Set config-cflags-avx512, HAVE_AVX512_SUPPORT and HAVE_AVX512_ASM_SUPPORT. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Add AVX-512 zmm register support. (_dl_x86_64_save_sse): Likewise. (_dl_x86_64_restore_sse): Likewise. * sysdeps/x86_64/dl-trampoline.h: Updated to support different size vector registers. * sysdeps/x86_64/link-defines.sym (YMM_SIZE): New. (ZMM_SIZE): Likewise. * sysdeps/x86_64/tst-audit10.c: New file. * sysdeps/x86_64/tst-auditmod10a.c: Likewise. * sysdeps/x86_64/tst-auditmod10b.c: Likewise.
2014-03-13Use __ehdr_start, when available, for rtld to get its own headers.Roland McGrath
2014-03-13ChangeLog format fix.Roland McGrath
2014-03-13Add missing elf/tst-pie2.c -- should have been inPaul Pluzhnikov
commit 798212a01311491d5e14fcda687460b75f8ca286
2014-03-13Regenerate INSTALL.Joseph Myers
2014-03-13manual/setjmp.texi: Improve clarity of Sys V context docWill Newton
ChangeLog: 2014-03-13 Will Newton <will.newton@linaro.org> * manual/setjmp.texi (System V contexts): Improve clarity and grammar of documentation.
2014-03-122014-03-12 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov
[BZ #16381] * elf/Makefile (tests): Add tst-pie2. (tests-pie): Add tst-pie2. * elf/tst-pie2.c: New file. * elf/dl-load.c (_dl_map_object_from_fd): Assert correct l_type for ET_EXEC. * elf/rtld.c (map_doit): Load executable as lt_executable. (dl_main): Likewise.
2014-03-12Fix __ASSUME_PSELECT for MicroBlaze (bug 16642).Joseph Myers
Reviewing (for all architectures, with a baseline kernel version of 2.6.32) the kernel support for features for which __ASSUME_* macros would be affected by a move to 2.6.32 as minimum kernel version showed up that __ASSUME_PSELECT was wrongly defined for MicroBlaze, despite the corresponding syscall table entry not being wired up in the MicroBlaze kernel. This patch makes the MicroBlaze kernel-features.h undefine __ASSUME_PSELECT. I'd also encourage wiring it up in the kernel (so you can then make this #undef conditional, and eventually obsolete once a recent-enough kernel is required). I suspect it wasn't wired up because of the mistaken comment in asm/unistd.h "obsolete -> sys_pselect7" (there is no such syscall as pselect7). [BZ #16642] * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_PSELECT): Undefine.
2014-03-12PowerPC: Fix bzero definition for static libc for PPC32Adhemerval Zanella
This patch fixes an issue for powerpc32-fpu static build which fails with an 'bzero' undefined reference. This patch adds bzero ifunc selector for static builds and fixes the '__bzero_ppc' reference to default memset symbol (since static memset build does not provide ifunc selector). Fixes BZ#16689.
2014-03-12Provide correct buffer length to netgroup queries in nscd (BZ #16695)Siddhesh Poyarekar
The buffer to query netgroup entries is allocated sufficient space for the netgroup entries and the key to be appended at the end, but it sends in an incorrect available length to the NSS netgroup query functions, resulting in overflow of the buffer in some special cases. The fix here is to factor in the key length when sending the available buffer and buffer length to the query functions.
2014-03-12PowerPC: Fix strspn for static buildAdhemerval Zanella
This patch makes the strspn ifunc selector build for static builds.