about summary refs log tree commit diff
path: root/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ #22332] release/2.22/masterPaul Eggert2018-04-131-0/+4
| | | | (cherry picked from commit a159b53fa059947cc2548e3b0d5bdcf7b9630ba8)
* CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320]Paul Eggert2018-04-131-0/+5
| | | | (cherry picked from commit c369d66e5426a30e4725b100d5cd28e372754f90)
* Record CVE-2018-6551 in NEWS and ChangeLog [BZ #22774]Florian Weimer2018-04-061-0/+4
| | | | (cherry picked from commit 71aa429b029fdb6f9e65d44050388b51eca460d6)
* Record CVE-2018-6485 in ChangeLog and NEWS [BZ #22343]Florian Weimer2018-04-061-0/+4
| | | | (cherry picked from commit 4590634fd65162568b9f52fb4beb60aa25da37f2)
* Add ChangeLog reference to bug 16750/CVE-2009-5064Florian Weimer2018-04-061-0/+6
| | | | (cherry picked from commit 403143e1df85dadd374f304bd891be0cd7573e3b)
* elf: Compute correct array size in _dl_init_paths [BZ #22606]Florian Weimer2018-04-061-0/+5
| | | | (cherry picked from commit 8a0b17e48b83e933960dfeb8fa08b259f03f310e)
* elf: Count components of the expanded path in _dl_init_path [BZ #22607]Florian Weimer2018-04-061-0/+6
| | | | (cherry picked from commit 3ff3dfa5af313a6ea33f3393916f30eece4f0171)
* elf: Check for empty tokens before dynamic string token expansion [BZ #22625]Aurelien Jarno2018-04-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The fillin_rpath function in elf/dl-load.c loops over each RPATH or RUNPATH tokens and interprets empty tokens as the current directory ("./"). In practice the check for empty token is done *after* the dynamic string token expansion. The expansion process can return an empty string for the $ORIGIN token if __libc_enable_secure is set or if the path of the binary can not be determined (/proc not mounted). Fix that by moving the check for empty tokens before the dynamic string token expansion. In addition, check for NULL pointer or empty strings return by expand_dynamic_string_token. The above changes highlighted a bug in decompose_rpath, an empty array is represented by the first element being NULL at the fillin_rpath level, but by using a -1 pointer in decompose_rpath and other functions. Changelog: [BZ #22625] * elf/dl-load.c (fillin_rpath): Check for empty tokens before dynamic string token expansion. Check for NULL pointer or empty string possibly returned by expand_dynamic_string_token. (decompose_rpath): Check for empty path after dynamic string token expansion. (cherry picked from commit 3e3c904daef69b8bf7d5cc07f793c9f07c3553ef)
* sunrpc: Avoid use-after-free read access in clntudp_call [BZ #21115]Florian Weimer2018-04-061-0/+3
| | | | | | | | | | | | | After commit bc779a1a5b3035133024b21e2f339fe4219fb11c (CVE-2016-4429: sunrpc: Do not use alloca in clntudp_call [BZ #20112]), ancillary data is stored on the heap, but it is accessed after it has been freed. The test case must be run under a heap debugger such as valgrind to observe the invalid access. A malloc implementation which immediately calls munmap on free would catch this bug as well. (cherry picked from commit d42eed4a044e5e10dfb885cf9891c2518a72a491)
* arm: mark __startcontext as .cantunwind (bug 20435)Andreas Schwab2016-08-181-0/+6
| | | | | | | | | | | __startcontext marks the bottom of the call stack of the contexts created by makecontext. (cherry picked from commit 9e2ff6c9cc54c0b4402b8d49e4abe7000fde7617) Also includes the NEWS update, cherry-picked from commits 056dd72af83f5459ce6d545a49dea6dba7d635dc and 4d047efdbc55b0d68947cde682e5363d16a66294.
* hppa: fix loading of global pointer in _start [BZ #20277]John David Anglin2016-07-011-1/+1
| | | | | | | | | The patched change fixes a regression for executables compiled with the -p option and linked with gcrt1.o. The executables crash on startup. This regression was introduced in 2.22 and was noticed in the gcc testsuite. (cherry picked from commit 9765ffa71030efd8bb4f2ea4ed6e020fcb4bb714)
* CVE-2016-4429: sunrpc: Do not use alloca in clntudp_call [BZ #20112]Florian Weimer2016-05-311-1/+5
| | | | | | | | | | | | The call is technically in a loop, and under certain circumstances (which are quite difficult to reproduce in a test case), alloca can be invoked repeatedly during a single call to clntudp_call. As a result, the available stack space can be exhausted (even though individual alloca sizes are bounded implicitly by what can fit into a UDP packet, as a side effect of the earlier successful send operation). (cherry picked from commit bc779a1a5b3035133024b21e2f339fe4219fb11c)
* hesiod: Always use thread-local resolver state [BZ #19573]Florian Weimer2016-05-111-2/+2
| | | | | | | | | | | | | | | | | | The Hesiod implementation imported into glibc was enhanced to support caller-supplied resolver states. But its only consumer is nss_hesiod, and it supplies the thread-local resolver state. Therefore, this commit changes the Hesiod implementation to use the thread-local resolver state (_res) directly. This fixes bug 19573 because the Hesiod implementation no longer has to initialize and free any resolver state. To avoid any risk of interposition of ABI-incompatible Hesiod function implementations, this commit marks the Hesiod functions as hidden. (They were already hidden using a linker version script.) (cherry picked from commit 5018f16c6205404ba3aa7298dc8a3d45fbd46bfc)
* CVE-2016-3706: getaddrinfo: stack overflow in hostent conversion [BZ #20010]Florian Weimer2016-05-111-1/+6
| | | | | | | | | | | | When converting a struct hostent response to struct gaih_addrtuple, the gethosts macro (which is called from gaih_inet) used alloca, without malloc fallback for large responses. This commit changes this code to use calloc unconditionally. This commit also consolidated a second hostent-to-gaih_addrtuple conversion loop (in gaih_inet) to use the new conversion function. (cherry picked from commit 4ab2ab03d4351914ee53248dc5aef4a8c88ff8b9)
* CVE-2016-1234: glob: Do not copy d_name field of struct dirent [BZ #19779]Florian Weimer2016-05-111-1/+6
| | | | | | | | Instead, we store the data we need from the return value of readdir in an object of the new type struct readdir_result. This type is independent of the layout of struct dirent. (cherry picked from commit 5171f3079f2cc53e0548fc4967361f4d1ce9d7ea)
* malloc: Fix list_lock/arena lock deadlock [BZ #19182]Florian Weimer2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | * malloc/arena.c (list_lock): Document lock ordering requirements. (free_list_lock): New lock. (ptmalloc_lock_all): Comment on free_list_lock. (ptmalloc_unlock_all2): Reinitialize free_list_lock. (detach_arena): Update comment. free_list_lock is now needed. (_int_new_arena): Use free_list_lock around detach_arena call. Acquire arena lock after list_lock. Add comment, including FIXME about incorrect synchronization. (get_free_list): Switch to free_list_lock. (reused_arena): Acquire free_list_lock around detach_arena call and attached threads counter update. Add two FIXMEs about incorrect synchronization. (arena_thread_freeres): Switch to free_list_lock. * malloc/malloc.c (struct malloc_state): Update comments to mention free_list_lock. (cherry picked from commit 90c400bd4904b0240a148f0b357a5cbc36179239)
* malloc: Fix attached thread reference count handling [BZ #19243]Florian Weimer2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | reused_arena can increase the attached thread count of arenas on the free list. This means that the assertion that the reference count is zero is incorrect. In this case, the reference count initialization is incorrect as well and could cause arenas to be put on the free list too early (while they still have attached threads). * malloc/arena.c (get_free_list): Remove assert and adjust reference count handling. Add comment about reused_arena interaction. (reused_arena): Add comments abount get_free_list interaction. * malloc/tst-malloc-thread-exit.c: New file. * malloc/Makefile (tests): Add tst-malloc-thread-exit. (tst-malloc-thread-exit): Link against libpthread. (cherry picked from commit 3da825ce483903e3a881a016113b3e59fd4041de)
* malloc: Prevent arena free_list from turning cyclic [BZ #19048]Florian Weimer2016-04-131-2/+11
| | | | | | | | | | | | | | | | | | | [BZ# 19048] * malloc/malloc.c (struct malloc_state): Update comment. Add attached_threads member. (main_arena): Initialize attached_threads. * malloc/arena.c (list_lock): Update comment. (ptmalloc_lock_all, ptmalloc_unlock_all): Likewise. (ptmalloc_unlock_all2): Reinitialize arena reference counts. (deattach_arena): New function. (_int_new_arena): Initialize arena reference count and deattach replaced arena. (get_free_list, reused_arena): Update reference count and deattach replaced arena. (arena_thread_freeres): Update arena reference count and only put unreferenced arenas on the free list. (cherry picked from commit a62719ba90e2fa1728890ae7dc8df9e32a622e7b)
* Increase internal precision of ldbl-128ibm decimal printf [BZ #19853]Paul E. Murphy2016-04-121-1/+1
| | | | | | | | | | | | | | | | When the signs differ, the precision of the conversion sometimes drops below 106 bits. This strategy is identical to the hexadecimal variant. I've refactored tst-sprintf3 to enable testing a value with more than 30 significant digits in order to demonstrate this failure and its solution. Additionally, this implicitly fixes a typo in the shift quantities when subtracting from the high mantissa to compute the difference. (cherry picked from commit 37a4c70bd4c5c74ac562072e450dc02e8cb4c150)
* NEWS: update from previous commitTulio Magno Quites Machado Filho2016-04-011-1/+6
|
* resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]Florian Weimer2016-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 44d20bca52ace85850012b0ead37b360e3ecd96e (Implement second fallback mode for DNS requests), there is a code path which returns early, before *resplen2 is initialized. This happens if the name server address is immediately recognized as invalid (because of lack of protocol support, or if it is a broadcast address such 255.255.255.255, or another invalid address). If this happens and *resplen2 was non-zero (which is the case if a previous query resulted in a failure), __libc_res_nquery would reuse an existing second answer buffer. This answer has been previously identified as unusable (for example, it could be an NXDOMAIN response). Due to the presence of a second answer, no name server switching will occur. The result is a name resolution failure, although a successful resolution would have been possible if name servers have been switched and queries had proceeded along the search path. The above paragraph still simplifies the situation. Before glibc 2.23, if the second answer needed malloc, the stub resolver would still attempt to reuse the second answer, but this is not possible because __libc_res_nsearch has freed it, after the unsuccessful call to __libc_res_nquerydomain, and set the buffer pointer to NULL. This eventually leads to an assertion failure in __libc_res_nquery: /* Make sure both hp and hp2 are defined */ assert((hp != NULL) && (hp2 != NULL)); If assertions are disabled, the consequence is a NULL pointer dereference on the next line. Starting with glibc 2.23, as a result of commit e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca (CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665)), the second answer is always allocated with malloc. This means that the assertion failure happens with small responses as well because there is no buffer to reuse, as soon as there is a name resolution failure which triggers a search for an answer along the search path. This commit addresses the issue by ensuring that *resplen2 is initialized before the send_dg function returns. This commit also addresses a bug where an invalid second reply is incorrectly returned as a valid to the caller. (cherry picked from commit b66d837bb5398795c6b0f651bd5a5d66091d8577)
* math: don't clobber old libm.so on install [BZ #19822]Dylan Alex Simon2016-03-211-1/+1
| | | | | | | | | | | | | | When installing glibc (w/mathvec enabled) in-place on a system with a glibc w/out mathvec enabled, the install will clobber the existing libm.so (e.g., /lib64/libm-2.21.so) with a linker script. This is because libm.so is a symlink to libm.so.6 which is a symlink to the final libm-2.21.so file. When the makefile writes the linker script directly to libm.so, it gets clobbered. The simple patch below to math/Makefile fixes this. It is based on the nptl Makefile, which does exactly the same thing in a safer way. (cherry picked from commit f9378ac3773ffe998a2b3406568778ee9f77f759)
* Use PIC relocation in ALIAS_IMPLAndrew Senkevich2016-03-111-1/+1
| | | | | | | | | | | Since libmvec_nonshared.a may be linked into shared objects, ALIAS_IMPL should use PIC relocation. [BZ #19590] * sysdeps/x86_64/fpu/svml_finite_alias.S (ALIAS_IMPL): Use PIC relocation. (cherry picked from commit a5df3210a641c175138052037fcdad34298bfa4d)
* Fix x86_64 fma4 pow inappropriate contraction (bug 19003).Joseph Myers2016-03-081-2/+2
| | | | | | | | | | | | | | | | | | The x86_64 fma4 version of pow fails to disable contraction of operations other than those explicitly intended to use fma instructions, so resulting in large ulps errors on processors with fma4 instructions, as in bug 18104 (165ulp for the test added for that bug; error originally reported by "blaaa" on #glibc). This patch adds $(config-cflags-nofma) for e_pow-fma4.c, corresponding to the use for e_pow.c in sysdeps/ieee754/dbl-64/Makefile. Tested for x86_64 on a processor with fma4. [BZ #19003] * sysdeps/x86_64/fpu/multiarch/Makefile (CFLAGS-e_pow-fma4.c): Add $(config-cflags-nofma). (cherry picked from commit 51df2605064a2bfd44fa0655ef9815812347de80)
* S390: Do not use direct socket syscalls if build on kernels >= 4.3. [BZ #19682]Stefan Liebler2016-03-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beginning with Linux 4.3, the kernel headers contain direct system call numbers __NR_socket etc. on s390x. On older kernels, the socket-multiplexer syscall __NR_socketcall was used. To enable these new syscalls, the patch "S390: Call direct system calls for socket operations." (https://sourceware.org/git/?p=glibc.git;a=commit;h=016495b818cb61df7d0d10e6db54074271b3e3a5) was applied upstream. If glibc 2.23 is configured with --enable-kernel=4.3 and newer, the direct socket syscalls are used. For older kernels, the socket-multiplexer syscall is used instead. In glibc 2.22 and earlier, this patch is not applied. If you build glibc on a kernel < 4.3, the socket-multiplexer syscall is used. But if you build glibc on kernel >= 4.3, the direct socket-syscalls are used. If you install this glibc on a kernel < 4.3, all socket operations will fail. See "Bug 19682 - s390x: Incorrect syscall definitions cause breakage with Linux 4.3 headers" (https://sourceware.org/bugzilla/show_bug.cgi?id=19682) The configure switch --enable-kernel does not influence this behaviour on older glibc-releases. The solution is to remove the direct socket-syscalls in sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (this patch) on older glibc-releases as it was done by the upstream patch, too. These entries were never used on s390x, but the c-files in sysdeps/unix/sysv/linux/. After this removal, the behaviour of the socket functions are not changed compared to the original glibc release version and the socket-multiplexer-syscall is always used.
* CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).Carlos O'Donell2016-02-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | * A stack-based buffer overflow was found in libresolv when invoked from libnss_dns, allowing specially crafted DNS responses to seize control of execution flow in the DNS client. The buffer overflow occurs in the functions send_dg (send datagram) and send_vc (send TCP) for the NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC family. The use of AF_UNSPEC triggers the low-level resolver code to send out two parallel queries for A and AAAA. A mismanagement of the buffers used for those queries could result in the response of a query writing beyond the alloca allocated buffer created by _nss_dns_gethostbyname4_r. Buffer management is simplified to remove the overflow. Thanks to the Google Security Team and Red Hat for reporting the security impact of this issue, and Robert Holiday of Ciena for reporting the related bug 18665. (CVE-2015-7547) See also: https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html (cherry picked from commit e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca)
* Improve check against integer wraparound in hcreate_r [BZ #18240]Florian Weimer2016-01-291-2/+2
| | | | (cherry picked from commit bae7c7c764413b23e61cb099ce33be4c4ee259bb)
* hppa: start.S: rework references to fix PIE TEXTRELs [BZ #18421]Alan Modra2016-01-241-2/+2
| | | | | | | The startup code was not using PIC friendly references leading to TEXTRELs in every PIE ELF. (cherry picked from commit cf4253777412e9c8d5bfbc1c8b975f472e1e7d43)
* hppa: Fix miscompilation of sched_setaffinity() [BZ #18480]John David Anglin2016-01-241-2/+2
| | | | | | | | | | | The attached change fixes the miscompilation of sched_setaffinity() on hppa. This is an old problem that was fixed on other architectures using a similar approach to the attached change. See: https://sourceware.org/ml/libc-hacker/2004-04/msg00016.html Build tested on trunk. Patch has been applied to debian glibc for some time. (cherry picked from commit 04ece7d2dec91fe870c5f1a38032875915f44633)
* Fix BZ #18985 -- out of range data to strftime() causes a segfaultPaul Pluzhnikov2016-01-231-1/+1
| | | | (cherry picked from commit d36c75fc0d44deec29635dd239b0fbd206ca49b7)
* Fix BZ #17905Paul Pluzhnikov2016-01-231-2/+2
| | | | (cherry picked from commit 0f58539030e436449f79189b6edab17d7479796e)
* powerpc: Fix usage of elision transient failure adapt paramPaul Murphy2015-12-171-1/+1
| | | | | | | | | | | | | | | | | | | The skip_lock_out_of_tbegin_retries adaptive parameter was not being used correctly, nor as described. This prevents a fallback for all users of the lock if a transient abort occurs within the accepted number of retries. [BZ #19174] * sysdeps/powerpc/nptl/elide.h (__elide_lock): Fix usage of .skip_lock_out_of_tbegin_retries. * sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__lll_lock_elision): Likewise, and respect a value of try_tbegin <= 0. (cherry picked from commit 72f1463df85a522bfd1568e47bd81371522ee358) Conflicts: NEWS
* Better workaround for aliases of *_finite symbols in vector math library.Andrew Senkevich2015-11-271-1/+1
| | | | | | | | | | | | | | Old workaround based on assembly aliases can lead to link fail (bug 19058). This patch makes workaround in another way to avoid it. [BZ #19058] * math/Makefile ($(inst_libdir)/libm.so): Added libmvec_nonshared.a to AS_NEEDED. * sysdeps/x86/fpu/bits/math-vector.h: Removed code with old workaround. * sysdeps/x86_64/fpu/Makefile (libmvec-support, libmvec-static-only-routines): Added new file. * sysdeps/x86_64/fpu/svml_finite_alias.S: New file. * NEWS: Mention this fix.
* Add a test for prelink outputH.J. Lu2015-11-101-1/+1
| | | | | | | | | | | | | | | | This test applies to i386 and x86_64 which set R_386_GLOB_DAT and R_X86_64_GLOB_DAT to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA. [BZ #19178] * sysdeps/x86/Makefile (tests): Add tst-prelink. (tst-prelink-ENV): New. ($(objpfx)tst-prelink-conflict.out): Likewise. ($(objpfx)tst-prelink-cmp.out): Likewise. (tests-special): Add $(objpfx)tst-prelink-cmp.out. * sysdeps/x86/tst-prelink.c: New file. * sysdeps/x86/tst-prelink.exp: Likewise. (cherry picked from commit fe534fe8980fa214c410e3661a4216e781073353)
* PowerPC: Fix a race condition when eliding a lockTulio Magno Quites Machado Filho2015-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code used to evaluate the preprocessor token is_lock_free to a variable before starting a transaction. This behavior can cause an error if another thread got the lock (without using a transaction) between the evaluation of the token and the beginning of the transaction. This bug can be triggered with the following order of events: 1. The lock accessed by is_lock_free is free. 2. Thread T1 evaluates is_lock_free and stores into register R1 that the lock is free. 3. Thread T2 acquires the same lock used in is_lock_free. 4. T1 begins the transaction, creating a memory barrier where is_lock_free is false, but R1 is true. 5. T1 reads R1 and doesn't abort the transaction. 6. T1 calls ELIDE_UNLOCK, which reads false from is_lock_free and decides to unlock a lock acquired by T2, leading to undefined behavior. This patch delays the evaluation of is_lock_free to inside a transaction by moving this part of the code to the macro ELIDE_LOCK. [BZ #18743] * sysdeps/powerpc/nptl/elide.h (__elide_lock): Move most of this code to... (ELIDE_LOCK): ...here. (__get_new_count): New function with part of the code from __elide_lock that updates the value of adapt_count after a transaction abort. (__elided_trylock): Moved this code to... (ELIDE_TRYLOCK): ...here. (cherry picked from commit 6ec52bf634b7650b57ff67b5f5053bce8992d549)
* Harden tls_dtor_list with pointer mangling [BZ #19018]Florian Weimer2015-10-191-1/+2
| | | | (cherry picked from commit f586e1328681b400078c995a0bb6ad301ef73549)
* Always enable pointer guard [BZ #18928]Florian Weimer2015-10-161-1/+4
| | | | | | | | | | | | | | | | Honoring the LD_POINTER_GUARD environment variable in AT_SECURE mode has security implications. This commit enables pointer guard unconditionally, and the environment variable is now ignored. [BZ #18928] * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove _dl_pointer_guard member. * elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard initializer. (security_init): Always set up pointer guard. (process_envvars): Do not process LD_POINTER_GUARD. (cherry picked from commit a014cecd82b71b70a6a843e250e06b541ad524f7)
* Let 'make check subdirs=string' succeed even when it's invokedMartin Sebor2015-10-081-1/+1
| | | | | | | immediately after glibc has been built and before 'make check' (or after 'make clean'). (cherry picked from commit 60cf80f09d029257caedc0c8abe7e3e09c64e6c7)
* strcoll: Remove incorrect STRDIFF-based optimization (Bug 18589).Carlos O'Donell2015-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The optimization introduced in commit f13c2a8dff2329c6692a80176262ceaaf8a6f74e, causes regressions in sorting for languages that have digraphs that change sort order, like cs_CZ which sorts ch between h and i. My analysis shows the fast-forwarding optimization in STRCOLL advances through a digraph while possibly stopping in the middle which results in a subsequent skipping of the digraph and incorrect sorting. The optimization is incorrect as implemented and because of that I'm removing it for 2.23, and I will also commit this fix for 2.22 where it was originally introduced. This patch reverts the optimization, introduces a new bug-strcoll2.c regression test that tests both cs_CZ.UTF-8 and da_DK.ISO-8859-1 and ensures they sort one digraph each correctly. The optimization can't be applied without regressing this test. Checked on x86_64, bug-strcoll2.c fails without this patch and passes after. This will also get a fix on 2.22 which has the same bug. (cherry picked from commit 87701a58e291bd7ac3b407d10a829dac52c9c16e)
* BZ#18921: Mark fixed in NEWS.Roland McGrath2015-09-081-1/+1
|
* Fix non-v9 32-bit sparc build.Brett Neumeier2015-08-311-1/+1
| | | | | [BZ #18870] * sysdeps/sparc/sparc32/sem_open.c: Add missing #include
* getmntent: fix memory corruption w/blank lines [BZ #18887]Mike Frysinger2015-08-291-1/+1
| | | | | | | | | | | | | | | | | | | The fix for BZ #17273 introduced a single byte of memory corruption when the line is entirely blank. It would walk back past the start of the buffer if the heap happened to be 0x20 or 0x09 and then write a NUL byte. buffer = '\n'; end_ptr = buffer; while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t') end_ptr--; *end_ptr = '\0'; Fix that and rework the tests. Adding the testcase for BZ #17273 to the existing \040 parser does not really make sense as it's unrelated, and leads to confusing behavior: it implicitly relies on the new entry being longer than the previous entry (since it just rewinds the FILE*). Split it out into its own dedicated testcase instead. (cherry picked from commit b0e805fa0d6fea33745952df7b7f5442ca4c374f)
* [BZ #18796]Andrew Senkevich2015-08-191-1/+1
| | | | | | * scripts/test-installation.pl: Don't add -lmvec to build options if libmvec wasn't built. * NEWS: Mention this fix.
* Clear DF_1_NODELETE flag only for failed to load library.Maxim Ostapenko2015-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | https://sourceware.org/bugzilla/show_bug.cgi?id=18778 If dlopen fails to load an object that has triggered loading libpthread it causes ld.so to unload libpthread because its DF_1_NODELETE flags has been forcefully cleared. The next call to __rtdl_unlock_lock_recursive will crash since pthread_mutex_unlock no longer exists. This patch moves l->l_flags_1 &= ~DF_1_NODELETE out of loop through all loaded libraries and performs the action only on inconsistent one. [BZ #18778] * elf/Makefile (tests): Add Add tst-nodelete2. (modules-names): Add tst-nodelete2mod. (tst-nodelete2mod.so-no-z-defs): New. ($(objpfx)tst-nodelete2): Likewise. ($(objpfx)tst-nodelete2.out): Likewise. (LDFLAGS-tst-nodelete2): Likewise. * elf/dl-close.c (_dl_close_worker): Move DF_1_NODELETE clearing out of loop through all loaded libraries. * elf/tst-nodelete2.c: New file. * elf/tst-nodelete2mod.c: Likewise. (cherry picked from commit f25238ffe0455013174438376b3ee88df496f9d1)
* Readd O_LARGEFILE flag for openat64 (bug 18781)Andreas Schwab2015-08-101-1/+1
| | | | (cherry picked from commit eb32b0d40308166c4d8f6330cc2958cb1e545075)
* hppa: Fix reload error with atomic code [BZ #18787]John David Anglin2015-08-081-0/+6
| | | | | | | | | | | | | As noted in the bug, the asm operands need to be copied to register variables to avoid operand reloads in the principal asm of the macro. See the arm implementation for reference. Otherwise we get: ../sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error: can't find a register in class 'R1_REGS' while reloading 'asm' Build tested on trunk with gcc-4.8. Similar patch has been tested with 2.19 on Debian hppa-unknown-linux-gnu. (cherry picked from commit 74bc0c3a16e3c8f138e29a284e84d16474b65a8e)
* Correct comments about the history of <regexp.h>Zack Weinberg2015-08-051-1/+1
| | | | | | In the "Kill regexp.h" thread, Joseph dug up more accurate information about exactly which editions of the Single Unix Standard included and deprecated this header.
* Properly terminate FDE in makecontext for ix86 (bug 18635)Andreas Schwab2015-08-041-2/+2
|
* Deprecate the use of regexp.hZack Weinberg2015-08-011-0/+8
| | | | | | | | | | | | | | | | | | <regexp.h> (not to be confused with <regex.h>) is an obsolete and frankly horrible regular expression-matching API. It was part of SVID but was withdrawn in Issue 5 (for reference, we're on Issue 7 now). It doesn't do anything you can't do with <regex.h>, and using it involves defining a bunch of macros before including the header. Moreover, the code in regexp.h that uses those macros has been buggy since its creation (in 1996) and no one has noticed, which indicates to me that there are no users. (Specifically, RETURN() is used in a whole bunch of cases where it should have been ERROR().) The header is given a warning and marked deprecated for 2.22. See: https://sourceware.org/ml/libc-alpha/2015-07/msg00862.html and https://sourceware.org/ml/libc-alpha/2015-07/msg00871.html.
* hppa: add bz entry for pthreadtypes.h fixMike Frysinger2015-07-301-19/+19
|