about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* configure: Add -Wall again to the default CFLAGSFlorian Weimer2023-08-151-1/+1
| | | | | | | Commit 78ceef25d64efeeb6067d1cb282a00466e637e2a ("configure: Remove --enable-all-warnings option") removed it due to a missing +. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* malloc: Remove bin scanning from memalign (bug 30723)Florian Weimer2023-08-152-166/+10
| | | | | | | | | | | | | | | | | On the test workload (mpv --cache=yes with VP9 video decoding), the bin scanning has a very poor success rate (less than 2%). The tcache scanning has about 50% success rate, so keep that. Update comments in malloc/tst-memalign-2 to indicate the purpose of the tests. Even with the scanning removed, the additional merging opportunities since commit 542b1105852568c3ebc712225ae78b ("malloc: Enable merging of remainders in memalign (bug 30723)") are sufficient to pass the existing large bins test. Remove leftover variables from _int_free from refactoring in the same commit. Reviewed-by: DJ Delorie <dj@redhat.com>
* resolv/nss_dns/dns-host: Get rid of alloca.Joe Simmons-Talbott2023-08-141-2/+2
| | | | | | Since the alloca is a small constant size use an array instead. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* x86_64: Add expm1 with FMAH.J. Lu2023-08-144-0/+55
| | | | | | | | | | | | | | | | | | On Skylake, it improves expm1 bench performance by: Before After Improvement max 70.204 68.054 3% min 20.709 16.2 22% mean 22.1221 16.7367 24% NB: Add extern long double __expm1l (long double); extern long double __expm1f128 (long double); for __typeof (__expm1l) and __typeof (__expm1f128) when __expm1 is defined since __expm1 may be expanded in their declarations which causes the build failure.
* LoongArch: elf: Add new LoongArch reloc types 109 into elf.hcaiyinyu2023-08-141-0/+1
| | | | | These reloc types are generated by GNU assembler >= 2.41 for relaxation support.
* elf: Add new LoongArch reloc types (101 to 108) into elf.hXi Ruoyao2023-08-141-0/+8
| | | | | | | | These reloc types are generated by GNU assembler >= 2.41 for relaxation support. Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=57a930e3 Signed-off-by: Xi Ruoyao <xry111@xry111.site>
* Loongarch: Add ifunc support and add different versions of strlendengjianbo2023-08-149-0/+418
| | | | | | strlen-lasx is implemeted by LASX simd instructions(256bit) strlen-lsx is implemeted by LSX simd instructions(128bit) strlen-align is implemented by LA basic instructions and never use unaligned memory acess
* LoongArch: Add minuimum binutils required versiondengjianbo2023-08-146-14/+9
| | | | | | | LoongArch glibc can add some LASX/LSX vector instructions codes, change the required minimum binutils version to 2.41 which could support vector instructions. HAVE_LOONGARCH_VEC_ASM is removed accordingly.
* LoongArch: Redefine macro LEAF/ENTRY.dengjianbo2023-08-141-10/+26
| | | | | | The following usage of macro LEAF/ENTRY are all feasible: 1. LEAF(fcn) -- the align value of fcn is .align 3(default value) 2. LEAF(fcn, 6) -- the align value of fcn is .align 6
* x86: Fix incorrect scope of setting `shared_per_thread` [BZ# 30745]Noah Goldstein2023-08-111-4/+3
| | | | | | | | | | | | | | The: ``` if (shared_per_thread > 0 && threads > 0) shared_per_thread /= threads; ``` Code was accidentally moved to inside the else scope. This doesn't match how it was previously (before af992e7abd). This patch fixes that by putting the division after the `else` block.
* x86_64: Add log2 with FMAH.J. Lu2023-08-113-0/+48
| | | | | | | | | On Skylake, it improves log2 bench performance by: Before After Improvement max 208.779 63.827 69% min 9.977 6.55 34% mean 10.366 6.8191 34%
* malloc: Enable merging of remainders in memalign (bug 30723)Florian Weimer2023-08-111-76/+121
| | | | | | | | | | | | | | | | | | | | | Previously, calling _int_free from _int_memalign could put remainders into the tcache or into fastbins, where they are invisible to the low-level allocator. This results in missed merge opportunities because once these freed chunks become available to the low-level allocator, further memalign allocations (even of the same size are) likely obstructing merges. Furthermore, during forwards merging in _int_memalign, do not completely give up when the remainder is too small to serve as a chunk on its own. We can still give it back if it can be merged with the following unused chunk. This makes it more likely that memalign calls in a loop achieve a compact memory layout, independently of initial heap layout. Drop some useless (unsigned long) casts along the way, and tweak the style to more closely match GNU on changed lines. Reviewed-by: DJ Delorie <dj@redhat.com>
* nscd: Do not rebuild getaddrinfo (bug 30709)Florian Weimer2023-08-116-80/+13
| | | | | | | | | | | | | | | | The nscd daemon caches hosts data from NSS modules verbatim, without filtering protocol families or sorting them (otherwise separate caches would be needed for certain ai_flags combinations). The cache implementation is complete separate from the getaddrinfo code. This means that rebuilding getaddrinfo is not needed. The only function actually used is __bump_nl_timestamp from check_pf.c, and this change moves it into nscd/connections.c. Tested on x86_64-linux-gnu with -fexceptions, built with build-many-glibcs.py. I also backported this patch into a distribution that still supports nscd and verified manually that caching still works. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* x86_64: Sort fpu/multiarch/MakefileH.J. Lu2023-08-101-20/+74
| | | | | | Sort Makefile variables using scripts/sort-makefile-lines.py. No code generation changes observed in libm. No regressions on x86_64.
* i686: Fix build with --disable-multiarchAdhemerval Zanella2023-08-106-2/+10
| | | | | | | | | | | | | | Since i686 provides the fortified wrappers for memcpy, mempcpy, memmove, and memset on the same string implementation, the static build tries to optimized it by not tying the fortified wrappers to string routine (to avoid pulling the fortify function if they are not required). Checked on i686-linux-gnu building with different option: default and --disable-multi-arch plus default, --disable-default-pie, --enable-fortify-source={2,3}, and --enable-fortify-source={2,3} with --disable-default-pie. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* x86_64: Fix build with --disable-multiarch (BZ 30721)Adhemerval Zanella2023-08-103-1/+5
| | | | | | | | | | | | | | With multiarch disabled, the default memmove implementation provides the fortify routines for memcpy, mempcpy, and memmove. However, it does not provide the internal hidden definitions used when building with fortify enabled. The memset has a similar issue. Checked on x86_64-linux-gnu building with different options: default and --disable-multi-arch plus default, --disable-default-pie, --enable-fortify-source={2,3}, and --enable-fortify-source={2,3} with --disable-default-pie. Tested-by: Andreas K. Huettel <dilfridge@gentoo.org> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Add PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG etc. from Linux 6.4 to sys/ptrace.hJoseph Myers2023-08-089-7/+103
| | | | | | | | | | | Linux 6.4 adds new constants PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG and PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG. Add those to all relevant sys/ptrace.h headers, along with adding the associated argument structure to bits/ptrace-shared.h (named struct __ptrace_sud_config there following the usual convention for such structures). Tested for x86_64 and with build-many-glibcs.py.
* Add PACKET_VNET_HDR_SZ from Linux 6.4 to netpacket/packet.hJoseph Myers2023-08-081-0/+1
| | | | | | | Linux 6.4 adds a new constant PACKET_VNET_HDR_SZ; add it to glibc's netpacket/packet.h. Tested for x86_64.
* hurd: Make error_t an int in C++Samuel Thibault2023-08-081-0/+6
| | | | | | | Making error_t defined to enum __error_t_codes conveniently makes the debugger print symbolic values, but in C++ int is not interoperable with enum __error_t_codes, leading to C++ application build issues, so let's revert error_t to int in C++.
* Use binutils 2.41 branch in build-many-glibcs.pyJoseph Myers2023-08-081-1/+1
| | | | | | | This patch makes build-many-glibcs.py use binutils 2.41 branch. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* linux: statvfs: allocate spare for f_typeнаб2023-08-084-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only missing part in struct statvfs. The LSB calls [f]statfs() deprecated, and its weird types are definitely off-putting. However, its use is required to get f_type. Instead, allocate one of the six spares to f_type, copied directly from struct statfs. This then becomes a small glibc extension to the standard interface on Linux and the Hurd, instead of two different interfaces, one of which is quite odd due to being an ABI type, and there no longer is any reason to use statfs(). The underlying kernel type is a mess, but all architectures agree on u32 (or more) for the ABI, and all filesystem magicks are 32-bit integers. We don't lose any generality by using u32, and by doing so we both make the API consistent with the Hurd, and allow C++ switch(f_type) { case RAMFS_MAGIC: ...; } Also fix tst-statvfs so that it actually fails; as it stood, all it did was return 0 always. Test statfs()' and statvfs()' f_types are the same. Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* hurd: statvfs: __f_type -> f_typeнаб2023-08-081-2/+2
| | | | | | | | | No further changes needed ([f]statvfs() just cast to struct statfs * and call [f]statfs()). Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* htl: Initialize ___pthread_self earlySamuel Thibault2023-08-083-17/+15
| | | | | | | | | | When using jemalloc, malloc() needs to use TSD, while libpthread initialization needs malloc(). Having ___pthread_self set early to some static storage allows TSD to work early, thus allowing jemalloc and libpthread to initialize together. This incidentaly simplifies __pthread_enable/disable_asynccancel and __pthread_self, now that ___pthread_self is always initialized.
* htl: Add support for static TSD dataSamuel Thibault2023-08-087-18/+97
| | | | | | When using jemalloc, malloc() needs to use TSD, while libpthread initialization needs malloc(). Supporting a static TSD area allows jemalloc and libpthread to initialize together.
* x86: Fix for cache computation on AMD legacy cpus.Sajan Karumanchi2023-08-061-27/+199
| | | | | | | | | | | Some legacy AMD CPUs and hypervisors have the _cpuid_ '0x8000_001D' set to Zero, thus resulting in zeroed-out computed cache values. This patch reintroduces the old way of cache computation as a fail-safe option to handle these exceptions. Fixed 'level4_cache_size' value through handle_amd(). Reviewed-by: Premachandra Mallappa <premachandra.mallappa@amd.com> Tested-by: Florian Weimer <fweimer@redhat.com>
* hurd: Rework generating errno.hSamuel Thibault2023-08-063-41/+19
| | | | | We only need to give to gawk the headers that actually define error numbers, so let's rather filter out the other included headers early.
* powerpc longjmp: Fix build after chk hidden builtin fixSamuel Thibault2023-08-041-0/+3
| | | | | | | | | | 04bf7d2d8a79 ("chk: Add and fix hidden builtin definitions for *_chk") added an #undef for longjmp and siglongjmp to compensate for the definition in include/setjmp.h, but missed doing so for the powerpc version too. Fixes: 04bf7d2d8a79 ("chk: Add and fix hidden builtin definitions for *_chk")
* LoongArch: Fix static PIE condition for toolchain bootstrapping.Yang Yujie2023-08-042-2/+2
| | | | | | This patch allows the static PIE startfile rcrt1.o to be built without requiring libgcc_s.so from GCC, which depends on libc in the first place.
* chk: Add and fix hidden builtin definitions for *_chkSamuel Thibault2023-08-036-0/+15
| | | | | | | Otherwise on gnu-i686 there are unwanted PLT entries in libc.so when fortification is enabled. Tested for i686-gnu, x86_64-gnu, i686-linux-gnu and x86_64-linux-gnu
* tst-realpath-toolong: return "unsupported" when PATH_MAX is undefinedSamuel Thibault2023-08-031-4/+5
| | | | | When PATH_MAX is undefined, realpath cannot ever ENAMETOOLONG, so this test is unsupported.
* Subject: hurd: Make __realpath return EINVAL on NULL bufSamuel Thibault2023-08-031-1/+10
| | | | | As Posix and stdlib/test-canon.c expects it, and rather than letting pathconf crash.
* tst-*glob*: Do not check d_name sizeSamuel Thibault2023-08-032-2/+2
| | | | | | | Posix says that d_name is of unspecified size, and sizeof(d_name) should not be used. It is indeed only 1-byte long in bits/dirent.h. We can instead explictly provide the actual allocated size to __strcpy_chk.
* hurd: Do not include full <stdarg.h> in <hurd.h>Florian Weimer2023-08-031-2/+2
| | | | | | | | | | | | | | | | | | This fixes a hurd/check-installed-headers-c failure with -std=c89 #define _FORTIFY_SOURCE 1: In file included from ../hurd/hurd.h:354, from ../sysdeps/hurd/include/hurd.h:2, from /tmp/cih_test_9IaUwa.c:10: /home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:54:34: error: "__STDC_VERSION__" is not defined, evaluates to 0 [-Werror=undef] 54 | #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \ | ^~~~~~~~~~~~~~~~ /home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:55:8: error: "__cplusplus" is not defined, evaluates to 0 [-Werror=undef] 55 | || __cplusplus + 0 >= 201103L | ^~~~~~~~~~~ cc1: all warnings being treated as errors Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* iconv: restore verbosity with unrecognized encoding names (bug 30694)Andreas Schwab2023-08-021-1/+1
| | | | | | | Commit 91927b7c76 ("Rewrite iconv option parsing [BZ #19519]") changed the iconv program to call __gconv_open directly instead of the iconv_open wrapper, but the former does not set errno. Update the caller to interpret the return codes like iconv_open does.
* configure: Remove --enable-all-warnings optionAdhemerval Zanella Netto2023-08-014-28/+1
| | | | | | | | The option is not activelly tested and has bitrotten, to fix it would require a lot of work and multiple fixes. A better option would to evaluate each option and enable the warning if it makes sense. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Add IP_PROTOCOL from Linux 6.4 to bits/in.hJoseph Myers2023-08-011-0/+1
| | | | | | | Linux 6.4 adds a new constant IP_PROTOCOL; add it to glibc's bits/in.h. Tested for x86_64.
* Update kernel version to 6.4 in header constant testsJoseph Myers2023-08-013-4/+4
| | | | | | | | | This patch updates the kernel version in the tests tst-mman-consts.py, tst-mount-consts.py and tst-pidfd-consts.py to 6.4. (There are no new constants covered by these tests in 6.4 that need any other header changes.) Tested with build-many-glibcs.py.
* PowerPC: Influence cpu/arch hwcap features via GLIBC_TUNABLESMahesh Bodapati2023-08-0113-74/+414
| | | | | | | | | | | This patch enables the option to influence hwcaps used by PowerPC. The environment variable, GLIBC_TUNABLES=glibc.cpu.hwcaps=-xxx,yyy,-zzz...., can be used to enable CPU/ARCH feature yyy, disable CPU/ARCH feature xxx and zzz, where the feature name is case-sensitive and has to match the ones mentioned in the file{sysdeps/powerpc/dl-procinfo.c}. Note that the hwcap tunables only used in the IFUNC selection. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* vfprintf-internal: Get rid of alloca.Joe Simmons-Talbott2023-08-012-1/+152
| | | | | | | | | Avoid potential stack overflow from unbounded alloca. Use the existing scratch_buffer instead. Add testcases to exercise the code as suggested by Adhemerval Zanella Netto. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* stdlib: Improve tst-realpath compatibility with source fortificationFlorian Weimer2023-08-011-1/+6
| | | | | | On GCC before 11, IPA can make the fortified realpath aware that the buffer size is not large enough (8 bytes instead of PATH_MAX bytes). Fix this by using a buffer that is large enough.
* Open master branch for glibc 2.39 development glibc-2.38.9000Andreas K. Hüttel2023-07-312-2/+25
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: Fix typos glibc-2.38Andreas K. Hüttel2023-07-311-2/+3
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Create ChangeLog.old/ChangeLog.27Andreas K. Hüttel2023-07-301-0/+10676
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Increase version numbersAndreas K. Hüttel2023-07-302-3/+3
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* INSTALL: regenerateAndreas K. Hüttel2023-07-301-7/+7
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* NEWS: minor wording fixesAndreas K. Hüttel2023-07-301-2/+2
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* install.texi: Build was tested with binutils 2.41 (just released)Andreas K. Hüttel2023-07-301-1/+1
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* install.texi: Update versions of most recent build toolsAndreas K. Hüttel2023-07-271-7/+7
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* contrib.texi: Update for 2.38Andreas K. Hüttel2023-07-271-7/+103
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* <sys/platform/x86.h>: Add APX supportH.J. Lu2023-07-275-0/+14
| | | | | | | | Add support for Intel Advanced Performance Extensions: https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html to <sys/platform/x86.h>.