about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* i386: Use _dl_runtime_[resolve|profile]_shstk for SHSTK [BZ #23716]H.J. Lu2018-10-093-69/+21
| | | | | | | | | | | | | | | | | | | | | When elf_machine_runtime_setup is called to set up resolver, it should use _dl_runtime_resolve_shstk or _dl_runtime_profile_shstk if SHSTK is enabled by kernel. Tested on i686 with and without --enable-cet as well as on CET emulator with --enable-cet. [BZ #23716] * sysdeps/i386/dl-cet.c: Removed. * sysdeps/i386/dl-machine.h (_dl_runtime_resolve_shstk): New prototype. (_dl_runtime_profile_shstk): Likewise. (elf_machine_runtime_setup): Use _dl_runtime_profile_shstk or _dl_runtime_resolve_shstk if SHSTK is enabled by kernel. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit 7b1f9406761331cf35fe521fbdb592beecf68a2c)
* kl_GL: Fix spelling of Sunday, should be "sapaat" (bug 20209).Rafal Luzynski2018-10-093-2/+11
| | | | | | | | | | | | | Although CLDR says otherwise, it is confirmed by Oqaasileriffik, the official Greenlandic language regulator, that this change is correct. [BZ #20209] * localedata/locales/kl_GL: (abday): Fix spelling of Sun (Sunday), should be "sap" rather than "sab". (day): Fix spelling of Sunday, should be "sapaat" rather than "sabaat". (cherry picked from commit dae3ed958c3d0090838e49ff4f78c201262b1cf0)
* Fix misreported errno on preadv2/pwritev2 (BZ#23579)Adhemerval Zanella2018-09-289-7/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fallback code of Linux wrapper for preadv2/pwritev2 executes regardless of the errno code for preadv2, instead of the case where the syscall is not supported. This fixes it by calling the fallback code iff errno is ENOSYS. The patch also adds tests for both invalid file descriptor and invalid iov_len and vector count. The only discrepancy between preadv2 and fallback code regarding error reporting is when an invalid flags are used. The fallback code bails out earlier with ENOTSUP instead of EINVAL/EBADF when the syscall is used. Checked on x86_64-linux-gnu on a 4.4.0 and 4.15.0 kernel. [BZ #23579] * misc/tst-preadvwritev2-common.c (do_test_with_invalid_fd): New test. * misc/tst-preadvwritev2.c, misc/tst-preadvwritev64v2.c (do_test): Call do_test_with_invalid_fd. * sysdeps/unix/sysv/linux/preadv2.c (preadv2): Use fallback code iff errno is ENOSYS. * sysdeps/unix/sysv/linux/preadv64v2.c (preadv64v2): Likewise. * sysdeps/unix/sysv/linux/pwritev2.c (pwritev2): Likewise. * sysdeps/unix/sysv/linux/pwritev64v2.c (pwritev64v2): Likewise. (cherry picked from commit 7a16bdbb9ff4122af0a28dc20996c95352011fdd)
* Fix stack overflow in tst-setcontext9 (bug 23717)Andreas Schwab2018-09-273-2/+9
| | | | | | | | The function f1a, executed on a stack of size 32k, allocates an object of size 32k on the stack. Make the stack variables static to reduce excessive stack usage. (cherry picked from commit f841c97e515a1673485a2b12b3c280073d737890)
* i386: Use ENTRY and END in start.S [BZ #23606]H.J. Lu2018-09-213-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrapping the _start function with ENTRY and END to insert ENDBR32 at function entry when CET is enabled. Since _start now includes CFI, without "cfi_undefined (eip)", unwinder may not terminate at _start and we will get Program received signal SIGSEGV, Segmentation fault. 0xf7dc661e in ?? () from /lib/libgcc_s.so.1 Missing separate debuginfos, use: dnf debuginfo-install libgcc-8.2.1-3.0.fc28.i686 (gdb) bt #0 0xf7dc661e in ?? () from /lib/libgcc_s.so.1 #1 0xf7dc7c18 in _Unwind_Backtrace () from /lib/libgcc_s.so.1 #2 0xf7f0d809 in __GI___backtrace (array=array@entry=0xffffc7d0, size=size@entry=20) at ../sysdeps/i386/backtrace.c:127 #3 0x08049254 in compare (p1=p1@entry=0xffffcad0, p2=p2@entry=0xffffcad4) at backtrace-tst.c:12 #4 0xf7e2a28c in msort_with_tmp (p=p@entry=0xffffca5c, b=b@entry=0xffffcad0, n=n@entry=2) at msort.c:65 #5 0xf7e29f64 in msort_with_tmp (n=2, b=0xffffcad0, p=0xffffca5c) at msort.c:53 #6 msort_with_tmp (p=p@entry=0xffffca5c, b=b@entry=0xffffcad0, n=n@entry=5) at msort.c:53 #7 0xf7e29f64 in msort_with_tmp (n=5, b=0xffffcad0, p=0xffffca5c) at msort.c:53 #8 msort_with_tmp (p=p@entry=0xffffca5c, b=b@entry=0xffffcad0, n=n@entry=10) at msort.c:53 #9 0xf7e29f64 in msort_with_tmp (n=10, b=0xffffcad0, p=0xffffca5c) at msort.c:53 #10 msort_with_tmp (p=p@entry=0xffffca5c, b=b@entry=0xffffcad0, n=n@entry=20) at msort.c:53 #11 0xf7e2a5b6 in msort_with_tmp (n=20, b=0xffffcad0, p=0xffffca5c) at msort.c:297 #12 __GI___qsort_r (b=b@entry=0xffffcad0, n=n@entry=20, s=s@entry=4, cmp=cmp@entry=0x8049230 <compare>, arg=arg@entry=0x0) at msort.c:297 #13 0xf7e2a84d in __GI_qsort (b=b@entry=0xffffcad0, n=n@entry=20, s=s@entry=4, cmp=cmp@entry=0x8049230 <compare>) at msort.c:308 #14 0x080490f6 in main (argc=2, argv=0xffffcbd4) at backtrace-tst.c:39 FAIL: debug/backtrace-tst [BZ #23606] * sysdeps/i386/start.S: Include <sysdep.h> (_start): Use ENTRY/END to insert ENDBR32 at entry when CET is enabled. Add cfi_undefined (eip). Signed-off-by: H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit 5a274db4ea363d6b0b92933f085a92daaf1be2f2)
* Fix strstr bug with huge needles (bug 23637)Wilco Dijkstra2018-09-214-4/+44
| | | | | | | | | | | | | | | | | The generic strstr in GLIBC 2.28 fails to match huge needles. The optimized AVAILABLE macro reads ahead a large fixed amount to reduce the overhead of repeatedly checking for the end of the string. However if the needle length is larger than this, two_way_long_needle may confuse this as meaning the end of the string and return NULL. This is fixed by adding the needle length to the amount to read ahead. [BZ #23637] * string/test-strstr.c (pr23637): New function. (test_main): Add tests with longer needles. * string/strcasestr.c (AVAILABLE): Fix readahead distance. * string/strstr.c (AVAILABLE): Likewise. (cherry picked from commit 83a552b0bb9fc2a5e80a0ab3723c0a80ce1db9f2)
* Fix tst-setcontext9 for optimized small stacks.Carlos O'Donell2018-09-202-9/+44
| | | | | | | | | | | | | | | | | | | If the compiler reduces the stack usage in function f1 before calling into function f2, then when we swapcontext back to f1 and continue execution we may overwrite registers that were spilled to the stack while f2 was executing. Later when we return to f2 the corrupt registers will be reloaded from the stack and the test will crash. This was most commonly observed on i686 with __x86.get_pc_thunk.dx and needing to save and restore $edx. Overall i686 has few registers and the spilling to the stack is bound to happen, therefore the solution to making this test robust is to split function f1 into two parts f1a and f1b, and allocate f1b it's own stack such that subsequent execution does not overwrite the stack in use by function f2. Tested on i686 and x86_64. Signed-off-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit 791b350dc725545e3f9b5db0f97ebdbc60c9735f)
* misc: New test misc/tst-gethostidFlorian Weimer2018-09-203-0/+121
| | | | | | The empty /etc/hosts file used to trigger bug 23679. (cherry picked from commit db9a8ad4ff3fc58e3773a9a4d0cabe3c1bc9c94c)
* Linux gethostid: Check for NULL value from gethostbyname_r [BZ #23679]Mingli Yu2018-09-203-2/+8
| | | | | | A NULL value can happen with certain gethostbyname_r failures. (cherry picked from commit 1214ba06e6771acb953a190091b0f6055c64fd25)
* Fix segfault in maybe_script_execute.Stefan Liebler2018-09-102-1/+6
| | | | | | | | | | | | | | | | | | | If glibc is built with gcc 8 and -march=z900, the testcase posix/tst-spawn4-compat crashes with a segfault. In function maybe_script_execute, the new_argv array is dynamically initialized on stack with (argc + 1) elements. The function wants to add _PATH_BSHELL as the first argument and writes out of bounds of new_argv. There is an off-by-one because maybe_script_execute fails to count the terminating NULL when sizing new_argv. ChangeLog: * sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute): Increment size of new_argv by one. (cherry picked from commit 28669f86f6780a18daca264f32d66b1428c9c6f1)
* regex: Add test tst-regcomp-truncated [BZ #23578]Florian Weimer2018-08-283-1/+200
| | | | (cherry picked from commit 761404b74d9853ce1608195e24f25b78a910591a)
* regex: fix uninitialized memory accessPaul Eggert2018-08-283-2/+18
| | | | | | | | | | | | | | | I introduced this bug into gnulib in commit 8335a4d6c7b4448cd0bcb6d0bebf1d456bcfdb17 dated 2006-04-10; eventually it was merged into glibc. The bug was found by project-repo <bugs@feusi.co> and reported here: https://lists.gnu.org/r/sed-devel/2018-08/msg00017.html Diagnosis and draft fix reported by Assaf Gordon here: https://lists.gnu.org/r/bug-gnulib/2018-08/msg00071.html https://lists.gnu.org/r/bug-gnulib/2018-08/msg00142.html * posix/regex_internal.c (build_wcs_upper_buffer): Fix bug when mbrtowc returns 0. (cherry picked from commit bc680b336971305cb39896b30d72dc7101b62242)
* pthread_cond_broadcast: Fix waiters-after-spinning case [BZ #23538]Martin Kuchta2018-08-273-2/+15
| | | | (cherry picked from commit 99ea93ca31795469d2a1f1570f17a5c39c2eb7e2)
* Improve ChangeLog message.DJ Delorie2018-08-221-1/+1
| | | | (cherry picked from commit e5721f45f6377c27ccb2572001dc98f7a2e6a146)
* Regen RISC-V rvd ULPsDJ Delorie2018-08-222-4/+14
| | | | | | | | | | * sysdeps/riscv/rv64/rvd/libm-test-ulps: Update. Note: I regen'd these from scratch, but I'm only committing the increases, as I only tested on hardware. There were a few 2->1 decreases that I omitted, possibly "for now". (cherry picked from commit bb17621ab89b2135c4d8d0d250b2aab5aa3e36c4)
* RISC-V: Fix rounding save/restore bug.DJ Delorie2018-08-222-1/+6
| | | | | | | | | * sysdeps/riscv/rvf/math_private.h (libc_feholdexcept_setround_riscv): Fix rounding save-restore bug. Fixes about a hundred off-by-ULP failures in the math testsuite. (cherry picked from commit bf4181878780be9b53e37a3b0fbabc40cdd07649)
* nss_files: Fix file stream leak in aliases lookup [BZ #23521]Florian Weimer2018-08-145-0/+263
| | | | | | | In order to get a clean test case, it was necessary to fix partially fixed bug 23522 as well. (cherry picked from commit e95c6f61920a0f9237cfb292fa44ad500e1df09b)
* nscd: Deallocate existing user names in file parserFlorian Weimer2018-08-142-1/+10
| | | | | | | This avoids a theoretical memory leak (theoretical because it depends on multiple server-user/stat-user directives in the configuration file). (cherry picked from commit 2d7acfac3ebf266dcbc82d0d6cc576f626953a03)
* error, error_at_line: Add missing va_end callsFlorian Weimer2018-08-142-0/+7
| | | | (cherry picked from commit b7b52b9dec337a08a89bc67638773be652eba332)
* Linux: Rewrite __old_getdents64 [BZ #23497]Florian Weimer2018-08-105-25/+194
| | | | | | | | | | | Commit 298d0e3129c0b5137f4989275b13fe30d0733c4d ("Consolidate Linux getdents{64} implementation") broke the implementation because it does not take into account struct offset differences. The new implementation is close to the old one, before the consolidation, but has been cleaned up slightly. (cherry picked from commit 690652882b499defb3d950dfeff8fe421d13cab5)
* hurd: Avoid PLTs for __pthread_get/setspecificSamuel Thibault2018-08-094-0/+8
| | | | | | | * sysdeps/htl/pthreadP.h [IS_IN (libpthread)] (__pthread_getspecific, __pthread_setspecific): Add hidden proto. * sysdeps/htl/pt-getspecific.c (__pthread_getspecific): Add hidden def. * sysdeps/htl/pt-setspecific.c (__pthread_setspecific): Add hidden def.
* hurd: Add missing symbols for proper libc_get/setspecificSamuel Thibault2018-08-082-0/+7
| | | | | * htl/Versions (__pthread_getspecific, __pthread_setspecific): Add symbols.
* Update NEWS, version.h, and features.h for glibc 2.28. glibc-2.28Carlos O'Donell2018-08-014-5/+188
|
* Synchronize translation project PO files.Carlos O'Donell2018-08-0125-46025/+62196
|
* hurd: Fix exec usage of mach_setup_threadSamuel Thibault2018-08-018-11/+41
| | | | | | | | | | | | | | | | Exec needs that mach_setup_thread does *not* set up TLS since it works on another task, so we have to split this into mach_setup_tls. * mach/mach.h (__mach_setup_tls, mach_setup_tls): Add prototypes. * mach/setup-thread.c (__mach_setup_thread): Move TLS setup to... (__mach_setup_tls): ... new function. (mach_setup_tls): New alias. * hurd/hurdsig.c (_hurdsig_init): Call __mach_setup_tls after __mach_setup_thread. * sysdeps/mach/hurd/profil.c (update_waiter): Likewise. * sysdeps/mach/hurd/setitimer.c (setitimer_locked): Likewise. * mach/Versions [libc] (mach_setup_tls): Add symbol. * sysdeps/mach/hurd/i386/libc.abilist (mach_setup_tls): Likewise.
* hurd: Add missing ChangeLog entrySamuel Thibault2018-08-011-0/+6
|
* hurd: Fix startup of static binaries linked against libpthreadSamuel Thibault2018-07-311-33/+35
| | | | | | * sysdeps/mach/hurd/i386/init-first.c (init1): Move ELF hdr and TLS initialization... (init): ... before initializing libpthread.
* Update tooling versions verified to work with glibc.Carlos O'Donell2018-07-313-20/+47
|
* Update contrib.texi contributions.Carlos O'Donell2018-07-312-12/+33
|
* Update translation for be.Carlos O'Donell2018-07-312-1214/+1052
|
* Update SH libm-tests-ulpsAdhemerval Zanella2018-07-312-4/+16
| | | | * sysdeps/sh/libm-test-ulps: Update.
* Update translations for bg, de, hr, pt_BR, sv, and vi.Carlos O'Donell2018-07-317-4699/+5221
|
* x86/CET: Fix property note parser [BZ #23467]H.J. Lu2018-07-306-9/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | GNU_PROPERTY_X86_FEATURE_1_AND may not be the first property item. We need to check each property item until we reach the end of the property or find GNU_PROPERTY_X86_FEATURE_1_AND. This patch adds 2 tests. The first test checks if IBT is enabled and the second test reads the output from the first test to check if IBT is is enabled. The second second test fails if IBT isn't enabled properly. Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23467] * sysdeps/unix/sysv/linux/x86/Makefile (tests): Add tst-cet-property-1 and tst-cet-property-2 if CET is enabled. (CFLAGS-tst-cet-property-1.o): New. (ASFLAGS-tst-cet-property-dep-2.o): Likewise. ($(objpfx)tst-cet-property-2): Likewise. ($(objpfx)tst-cet-property-2.out): Likewise. * sysdeps/unix/sysv/linux/x86/tst-cet-property-1.c: New file. * sysdeps/unix/sysv/linux/x86/tst-cet-property-2.c: Likewise. * sysdeps/unix/sysv/linux/x86/tst-cet-property-dep-2.S: Likewise. * sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Parse each property item until GNU_PROPERTY_X86_FEATURE_1_AND is found.
* x86: Add tst-get-cpu-features-static to $(tests) [BZ #23458]H.J. Lu2018-07-302-1/+6
| | | | | | | | | All tests should be added to $(tests). Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23458] * sysdeps/x86/Makefile (tests): Add tst-get-cpu-features-static.
* hurd: Fix some ld.so symbol override from libcSamuel Thibault2018-07-283-1/+23
| | | | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. * sysdeps/mach/hurd/not-errno.h: New file. * sysdeps/mach/hurd/i386/localplt.data: Update accordingly.
* hurd: Fix some ld.so symbol override from libcSamuel Thibault2018-07-284-12/+15
| | | | | | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. * sysdeps/mach/hurd/dl-unistd.h (__access, __brk, __lseek, __read, __sbrk): Do not set attribute_hidden. * sysdeps/mach/hurd/i386/ld.abilist: Update accordingly. * sysdeps/mach/hurd/i386/localplt.data: Update accordingly.
* Update translations for cs, pl, and uk.Carlos O'Donell2018-07-274-1140/+1242
|
* x86/CET: Don't parse beyond the note endH.J. Lu2018-07-272-1/+6
| | | | | | | | | Simply check if "ptr < ptr_end" since "ptr" is always incremented by 8. Reviewed-by: Carlos O'Donell <carlos@redhat.com> * sysdeps/x86/dl-prop.h (_dl_process_cet_property_note): Don't parse beyond the note end.
* Update NEWS with ISO 14651 update information.Carlos O'Donell2018-07-271-0/+12
|
* NEWS: Avoid the words "nominative" and "genitive".Rafal Luzynski2018-07-271-3/+4
| | | | | | | | | Glibc supports two grammatical forms of month names and we keep adding the locale data which actually use this feature but those two forms are not necessarily nominative and genitive. It is better to use a more generic term. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix Linux fcntl OFD locks on unsupported kernelsAdhemerval Zanella2018-07-273-2/+18
| | | | | | | | | | | This patch make the OFD tests return unsupported if kernel does not support OFD locks (it was added on 3.15). Checked on a ia64-linux-gnu with Linux 3.14. * sysdeps/unix/sysv/linux/tst-ofdlocks.c: Return unsupported if kernel does not support OFD locks. * sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c: Likewise.
* Add the missing ChangeLog entry for commit be525a69a66H.J. Lu2018-07-271-0/+10
|
* hurd: Fix some ld.so symbol override from libcSamuel Thibault2018-07-276-8/+34
| | | | | | | | | | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. More fixes are needed to avoid the hidden attribute. * sysdeps/mach/hurd/Versions (libc): Make __access and __access_noerrno external so they can override the ld symbols. (ld): Make __access, __read, __sbrk, __strtoul_internal, __write, __writev, __open64, __access_noerrno extern so they can be overrided. * sysdeps/mach/hurd/i386/libc.abilist: Update accordingly. * sysdeps/mach/hurd/i386/ld.abilist: Update accordingly.
* Update libc.pot.Carlos O'Donell2018-07-262-353/+375
|
* Update powerpc-nofpu ulps.Joseph Myers2018-07-262-0/+39
| | | | * sysdeps/powerpc/nofpu/libm-test-ulps: Update.
* x86: Populate COMMON_CPUID_INDEX_80000001 for Intel CPUs [BZ #23459]H.J. Lu2018-07-262-10/+19
| | | | | | | | | | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23459] * sysdeps/x86/cpu-features.c (get_extended_indices): New function. (init_cpu_features): Call get_extended_indices for both Intel and AMD CPUs. * sysdeps/x86/cpu-features.h (COMMON_CPUID_INDEX_80000001): Remove "for AMD" comment.
* x86: Correct index_cpu_LZCNT [BZ # 23456]H.J. Lu2018-07-262-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | cpu-features.h has #define bit_cpu_LZCNT (1 << 5) #define index_cpu_LZCNT COMMON_CPUID_INDEX_1 #define reg_LZCNT But the LZCNT feature bit is in COMMON_CPUID_INDEX_80000001: Initial EAX Value: 80000001H ECX Extended Processor Signature and Feature Bits: Bit 05: LZCNT available index_cpu_LZCNT should be COMMON_CPUID_INDEX_80000001, not COMMON_CPUID_INDEX_1. The VMX feature bit is in COMMON_CPUID_INDEX_1: Initial EAX Value: 01H Feature Information Returned in the ECX Register: 5 VMX Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ # 23456] * sysdeps/x86/cpu-features.h (index_cpu_LZCNT): Set to COMMON_CPUID_INDEX_80000001.
* Fix string/tst-xbzero-opt if build with gcc head.Stefan Liebler2018-07-262-0/+20
| | | | | | | | | | | | | | | | | | | | | | On s390x, the test string/tst-xbzero-opt is failing if build with gcc head: FAIL: no clear/prepare: expected 32 got 0 FAIL: no clear/test: expected some got 0 FAIL: ordinary clear/prepare: expected 32 got 0 INFO: ordinary clear/test: found 0 patterns (memset not eliminated) PASS: explicit clear/prepare: expected 32 got 32 PASS: explicit clear/test: expected 0 got 0 In setup_no_clear / setup_ordinary_clear, GCC is omitting the memcpy loop in prepare_test_buffer. Thus count_test_patterns does not find any of the test_pattern. This patch calls use_test_buffer in order to force the compiler to really copy the pattern to buf. ChangeLog: * string/tst-xbzero-opt.c (use_test_buffer): New function. (prepare_test_buffer): Call use_test_buffer as compiler barrier.
* htl: Use weak aliases for public symbolsFlorian Weimer2018-07-262-3/+8
| | | | | Strong definitions of flockfile, funlockfile, ftrylockfile can conflict with application symbols when linking statically.
* Add missing localedata/en_US.UTF-8.in (Bug 23393).Carlos O'Donell2018-07-251-0/+2159
| | | | | Commit 7cd7d36f1feb3ccacf476e909b115b45cdd46e77 failed to include the new testing file en_US.UTF-8.in.