about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* x86: In ld.so, diagnose missing APX support in APX-only builds HEAD masterFlorian Weimer2 days1-0/+5
| | | | | | | | | At this point, this is mainly a tool for testing the early ld.so CPU compatibility diagnostics: GCC uses the new instructions in most functions, so it's easy to spot if some of the early code is not built correctly. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* elf: Also compile dl-misc.os with $(rtld-early-cflags)H.J. Lu2 days1-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also compile dl-misc.os with $(rtld-early-cflags) to avoid Program received signal SIGILL, Illegal instruction. 0x00007ffff7fd36ea in _dl_strtoul (nptr=nptr@entry=0x7fffffffe2c9 "2", endptr=endptr@entry=0x7fffffffd728) at dl-misc.c:156 156 bool positive = true; (gdb) bt #0 0x00007ffff7fd36ea in _dl_strtoul (nptr=nptr@entry=0x7fffffffe2c9 "2", endptr=endptr@entry=0x7fffffffd728) at dl-misc.c:156 #1 0x00007ffff7fdb1a9 in tunable_initialize ( cur=cur@entry=0x7ffff7ffbc00 <tunable_list+2176>, strval=strval@entry=0x7fffffffe2c9 "2", len=len@entry=1) at dl-tunables.c:131 #2 0x00007ffff7fdb3a2 in parse_tunables (valstring=<optimized out>) at dl-tunables.c:258 #3 0x00007ffff7fdb5d9 in __GI___tunables_init (envp=0x7fffffffdd58) at dl-tunables.c:288 #4 0x00007ffff7fe44c3 in _dl_sysdep_start ( start_argptr=start_argptr@entry=0x7fffffffdcb0, dl_main=dl_main@entry=0x7ffff7fe5f80 <dl_main>) at ../sysdeps/unix/sysv/linux/dl-sysdep.c:110 #5 0x00007ffff7fe5cae in _dl_start_final (arg=0x7fffffffdcb0) at rtld.c:494 #6 _dl_start (arg=0x7fffffffdcb0) at rtld.c:581 #7 0x00007ffff7fe4b38 in _start () (gdb) when setting GLIBC_TUNABLES in glibc compiled with APX. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in ↵Florian Weimer2 days1-98/+121
| | | | | | | | | | | | | | | | | addgetnetgrentX (bug 31680) This avoids potential memory corruption when the underlying NSS callback function does not use the buffer space to store all strings (e.g., for constant strings). Instead of custom buffer management, two scratch buffers are used. This increases stack usage somewhat. Scratch buffer allocation failure is handled by return -1 (an invalid timeout value) instead of terminating the process. This fixes bug 31679. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response ↵Florian Weimer2 days1-4/+7
| | | | | | | | | | | | | | | | | (bug 31678) The addgetnetgrentX call in addinnetgrX may have failed to produce a result, so the result variable in addinnetgrX can be NULL. Use db->negtimeout as the fallback value if there is no result data; the timeout is also overwritten below. Also avoid sending a second not-found response. (The client disconnects after receiving the first response, so the data stream did not go out of sync even without this fix.) It is still beneficial to add the negative response to the mapping, so that the client can get it from there in the future, instead of going through the socket. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* CVE-2024-33600: nscd: Do not send missing not-found response in ↵Florian Weimer2 days1-8/+6
| | | | | | | | | addgetnetgrentX (bug 31678) If we failed to add a not-found response to the cache, the dataset point can be null, resulting in a null pointer dereference. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677)Florian Weimer2 days1-2/+3
| | | | | | | Using alloca matches what other caches do. The request length is bounded by MAXKEYLEN. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* i386: ulp update for SSE2 --disable-multi-arch configurationsFlorian Weimer2 days1-0/+1
|
* GLIBC-SA-2024-0004: add commit for 2.31 branchAurelien Jarno3 days1-0/+1
| | | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* benchtests: Add difficult strstr needle for bruteforce algorithmsWilco Dijkstra3 days1-0/+27
| | | | | | | Add another difficult needle to strstr that clearly shows the quadratic complexity of bruteforce algorithms. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676]H.J. Lu3 days4-1/+18
| | | | | | | | | | | | | | | | | | | Define MINIMUM_X86_ISA_LEVEL at configure time to avoid /usr/bin/ld: …/build/elf/librtld.os: in function `init_cpu_features': …/git/elf/../sysdeps/x86/cpu-features.c:1202: undefined reference to `_dl_runtime_resolve_fxsave' /usr/bin/ld: …/build/elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `_dl_runtime_resolve_fxsave' can not be used when making a shared object /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status when glibc is built with -march=x86-64-v3 and configured with --with-rtld-early-cflags=-march=x86-64, which is used to allow ld.so to print an error message on unsupported CPUs: Fatal glibc error: CPU does not support x86-64-v3 This fixes BZ #31676. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* LoongArch: Add glibc.cpu.hwcap support.caiyinyu3 days13-9/+475
| | | | | | | | | | | | | | | | The current IFUNC selection is always using the most recent features which are available via AT_HWCAP. But in some scenarios it is useful to adjust this selection. The environment variable: GLIBC_TUNABLES=glibc.cpu.hwcaps=-xxx,yyy,zzz,.... can be used to enable HWCAP feature yyy, disable HWCAP feature xxx, where the feature name is case-sensitive and has to match the ones used in sysdeps/loongarch/cpu-tunables.c. Signed-off-by: caiyinyu <caiyinyu@loongson.cn>
* nptl: Fix tst-cancel30 on kernels without ppoll_time64 supportFlorian Weimer4 days1-4/+11
| | | | | | | | Fall back to ppoll if ppoll_time64 fails with ENOSYS. Fixes commit 370da8a121c3ba9eeb2f13da15fc0f21f4136b25 ("nptl: Fix tst-cancel30 on sparc64"). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Revert "Allow glibc to be compiled without EXEC_PAGESIZE"Samuel Thibault5 days3-8/+2
| | | | | | This reverts commit 49aa652db810ebdca3a662ebd5b0468bd08ec688. This is still being discussed.
* locale: Handle loading a missing locale twice (Bug 14247)Carlos O'Donell5 days6-10/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | Delay setting file->decided until the data has been successfully loaded by _nl_load_locale(). If the function fails to load the data then we must return and error and leave decided untouched to allow the caller to attempt to load the data again at a later time. We should not set decided to 1 early in the function since doing so may prevent attempting to load it again. We want to try loading it again because that allows an open to fail and set errno correctly. On the other side of this problem is that if we are called again with the same inputs we will fetch the cached version of the object and carry out no open syscalls and that fails to set errno so we must set errno to ENOENT in that case. There is a second code path that has to be handled where the name of the locale matches but the codeset doesn't match. These changes ensure that errno is correctly set on failure in all the return paths in _nl_find_locale(). Adds tst-locale-loadlocale to cover the bug. No regressions on x86_64. Co-authored-by: Jeff Law <law@redhat.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf: Do not check for loader mmap on tst-decorate-maps (BZ 31553)Adhemerval Zanella5 days1-6/+6
| | | | | | | | | | | | On some architectures and depending on the page size, the loader can also allocate some memory during dependencies loading and it will be marked as 'loader malloc'. However, if the system page size is large enough, the initial data page will be enough for all required allocation and there will be no extra loader mmap. To avoid false negatives, the test does not check for such pages. Checked on powerpc64le-linux-gnu with 64k pagesize. Reviewed-by: Simon Chopin <simon.chopin@canonical.com>
* Use --enable-obsolete in build-many-glibcs.py for nios2-linux-gnuJoseph Myers8 days1-1/+2
| | | | | | | | Until GCC removes Nios II support (at which point we should do so as well), this is now needed for GCC 14 / mainline to build for nios2-linux-gnu target. Tested with build-many-glibcs.py (GCC mainline) for nios2-linux-gnu.
* login: Use unsigned 32-bit types for seconds-since-epochFlorian Weimer8 days6-5/+55
| | | | | | | | | | | | These fields store timestamps when the system was running. No Linux systems existed before 1970, so these values are unused. Switching to unsigned types allows continued use of the existing struct layouts beyond the year 2038. The intent is to give distributions more time to switch to improved interfaces that also avoid locking/data corruption issues. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)Florian Weimer8 days18-22/+165
| | | | | | | | | These structs describe file formats under /var/log, and should not depend on the definition of _TIME_BITS. This is achieved by defining __WORDSIZE_TIME64_COMPAT32 to 1 on 32-bit ports that support 32-bit time_t values (where __time_t is 32 bits). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* login: Check default sizes of structs utmp, utmpx, lastlogFlorian Weimer8 days17-1/+88
| | | | | | | | The default <utmp-size.h> is for ports with a 64-bit time_t. Ports with a 32-bit time_t or with __WORDSIZE_TIME64_COMPAT32=1 need to override it. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* benchtests: Add random() benchmarkWilco Dijkstra9 days2-0/+107
| | | | | | | | | | Add a simple benchmark to measure the overhead of internal libc locks in the random() implementation on both single- and multi-threaded cases. This relies on the implementation of random using internal locks to access shared global data, and that the runtime uses multi-threaded locking once a thread has been created (even after it finishes). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* advisories: Add Reported-BySiddhesh Poyarekar9 days1-0/+4
| | | | | | Add a new tag to give credit to vulnerability discoverers. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Fix 'Reported-By' to use Camel Case for commit 6a98f4640ea453fAdhemerval Zanella10 days1-1/+1
|
* Document CVE-2024-2961Adhemerval Zanella10 days1-0/+27
| | | | This commit adds "advisories" entries for the above three CVEs.
* iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence ↵Charles Fol10 days3-1/+144
| | | | | | | | | | | | | | | | (CVE-2024-2961) ISO-2022-CN-EXT uses escape sequences to indicate character set changes (as specified by RFC 1922). While the SOdesignation has the expected bounds checks, neither SS2designation nor SS3designation have its; allowing a write overflow of 1, 2, or 3 bytes with fixed values: '$+I', '$+J', '$+K', '$+L', '$+M', or '$*H'. Checked on aarch64-linux-gnu. Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* elf/rtld: Count skipped environment variables for enable_secureJoe Simmons-Talbott11 days3-8/+66
| | | | | | | | | | | | When using the glibc.rtld.enable_secure tunable we need to keep track of the count of environment variables we skip due to __libc_enable_secure being set and adjust the auxv section of the stack. This fixes an assertion when running ld.so directly with glibc.rtld.enable_secure set. Add a testcase that ensures the assert is not hit. elf/rtld.c:1324 assert (auxv == sp + 1); Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* powerpc: Fix ld.so address determination for PCREL mode (bug 31640)Florian Weimer14 days1-0/+19
| | | | | | | | This seems to have stopped working with some GCC 14 versions, which clobber r2. With other compilers, the kernel-provided r2 value is still available at this point. Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
* Revert "x86_64: Suppress false positive valgrind error"Florian Weimer2024-04-134-29/+3
| | | | | | | | | | | | | | This reverts commit a1735e0aa858f0c8b15e5ee9975bff4279423680. The test failure is a real valgrind bug that needs to be fixed before valgrind is usable with a glibc that has been built with CC="gcc -march=x86-64-v3". The proposed valgrind patch teaches valgrind to replace ld.so strcmp with an unoptimized scalar implementation, thus avoiding any AVX2-related problems. Valgrind bug: <https://bugs.kde.org/show_bug.cgi?id=485487> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* wcsmbs: Ensure wcstr worst-case linear execution time (BZ 23865)Adhemerval Zanella2024-04-113-72/+507
| | | | | | | | | | It uses the same two-way algorithm used on strstr, strcasestr, and memmem. Different than strstr, neither the "shift table" optimization nor the self-adapting filtering check is used because it would result in a too-large shift table (and it also simplifies the implementation bit). Checked on x86_64-linux-gnu and aarch64-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
* wcsmbs: Add test-wcsstrAdhemerval Zanella2024-04-114-54/+117
| | | | | | | | Parametrize test-strstr.c so it can be used to check wcsstr. Checked on x86_64-linux-gnu and aarch64-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
* posix: Sync tempname with gnulibAdhemerval Zanella2024-04-1012-132/+260
| | | | | | | | | | | | | | | | | | | | | | | | | The gnulib version contains an important change (9ce573cde), which fixes some problems with multithreading, entropy loss, and ASLR leak nfo. It also fixes an issue where getrandom is not being used on some new files generation (only for __GT_NOCREATE on first try). The 044bf893ac removed __path_search, which is now moved to another gnulib shared files (stdio-common/tmpdir.{c,h}). Tthis patch also fixes direxists to use __stat64_time64 instead of __xstat64, and move the include of pathmax.h for !_LIBC (since it is not used by glibc). The license is also changed from GPL 3.0 to 2.1, with permission from the authors (Bruno Haible and Paul Eggert). The sync also removed the clock fallback, since clock_gettime with CLOCK_REALTIME is expected to always succeed. It syncs with gnulib commit 323834962817af7b115187e8c9a833437f8d20ec. Checked on x86_64-linux-gnu. Co-authored-by: Bruno Haible <bruno@clisp.org> Co-authored-by: Paul Eggert <eggert@cs.ucla.edu> Reviewed-by: Bruno Haible <bruno@clisp.org>
* socket: Add new test for connectSergey Kolosov2024-04-102-0/+114
| | | | | | | This commit adds a simple bind/accept/connect test for an IPv4 TCP connection to a local process via the loopback interface. Reviewed-by: Arjun Shankar <arjun@redhat.com>
* libsupport: Add xgetpeernameSergey Kolosov2024-04-103-0/+32
| | | | | | The patch adds redirections for getpeername. Reviewed-by: Arjun Shankar <arjun@redhat.com>
* nptl: Add tst-pthread-key1-static for BZ #21777H.J. Lu2024-04-092-0/+39
| | | | | | Add a static pthread static tests to verify that BZ #21777 is fixed. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* elf: Add ld.so test with non-existing program nameFlorian Weimer2024-04-082-0/+46
| | | | | | | | | None of the existing tests seem to cover the case where _dl_signal_error is called without an active error handler. The new elf/tst-rtld-does-not-exist test triggers such a _dl_signal_error call from _dl_map_object. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* elf: Check objname before calling fatal_errorH.J. Lu2024-04-081-1/+5
| | | | | | | _dl_signal_error may be called with objname == NULL. _dl_exception_create checks objname == NULL. But fatal_error doesn't. Check objname before calling fatal_error. This fixes BZ #31596. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* Use crtbeginT.o and crtend.o for non-PIE static executablesH.J. Lu2024-04-081-4/+6
| | | | | | | When static PIE is enabled by default, we shouldn't use crtbeginS.o and crtendS.o for non-PIE static executables. Check $($(@F)-no-pie) to use crtbeginT.o and crtend.o to create non-PIE static executables. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* aarch64: Enhanced CPU diagnostics for ld.soFlorian Weimer2024-04-082-0/+118
| | | | | | | This prints some information from struct cpu_features, and the midr_el1 and dczid_el0 system register contents on every CPU. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* x86: Add generic CPUID data dumper to ld.so --list-diagnosticsFlorian Weimer2024-04-082-1/+468
| | | | | | | | | | | This is surprisingly difficult to implement if the goal is to produce reasonably sized output. With the current approaches to output compression (suppressing zeros and repeated results between CPUs, folding ranges of identical subleaves, dealing with the %ecx reflection issue), the output is less than 600 KiB even for systems with 256 logical CPUs. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* elf: Add CPU iteration support for future use in ld.so diagnosticsFlorian Weimer2024-04-083-0/+236
| | | | Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* timezone: sync to TZDB 2024aPaul Eggert2024-04-079-1555/+2687
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync tzselect, zdump, zic to TZDB 2024a. This patch incorporates the following TZDB source code changes, listed roughly in descending order of importance. zic now supports links to links, needed for future tzdata zic now defaults to '-b slim' zic now updates output files atomically zic has new options -R, -l -, -p - zic -r now uses -00 for unspecified timestamps zdump now uses [lo,hi) for both -c and -t Fix several integer overflow bugs zic now checks input bytes more carefully Simplify and fix new TZDIR setup Default time_t to 64 bits on glibc 2.34+ 32-bit zic now generates TZ strings that conform to POSIX when all-year DST zic -v now shows extreme-int tm_year transitions Fix zic bug in last time type of Asia/Gaza etc. Fix zic bug with Palestine after 2075 Fix bug uncovered by recent change to Iran history Fix 'zic -b fat' bug with Port Moresby 32-bit data Fix zic bug with -r @X where X is deduced from TZ Fix bug with zic -r cutoff before 1st transition Fix leap second expiry and truncation Fix zic bug on Linux 2.6.16 and 2.6.17 Fix bug with 'zic -d /a/b/c' if /a is unwriteable Don't mistruncate TZif files at leap seconds Fix zdump undefined behavior if !USE_LTZ zdump -v reports localtime+gmtime failures better Fix zdump diagnostic for missing timezone Don't assume nonempty argv Port better to C23 Do not assume negative >> behavior I18nize zdump a bit better Port zdump to right_only installations New tzselect menu option 'now' tzselect can now use current time to help choose Improve tzselect behavior for Turkey etc. tzselect: do not create temporary files tzselect: work around mawk bug with {2,} tzselect: Port to POSIX awk, which prohibits -v newlines Do not use empty RE in tzselect Don't set TZ in tzselect Avoid sed, expr in tzselect tzselect: Fix problems with spaces in TZDIR Improve tzselect diagnostics Remove zic workaround for Qt bug 53071 Remove zic support for "min" in Rule lines Remove zic support for zic -y, Rule TYPEs, pacificnew Remove tzselect workaround for Bash 1.14.7 bug * SHARED-FILES: Update to match current sync. * config.h.in (HAVE_STRERROR): Remove; no longer needed. * timezone/Makefile ($(objpfx)zic.o): Depend on tzdir.h. ($(objpfx)tzdir.h): New rule to build a placeholder. * timezone/private.h, timezone/tzfile.h, timezone/version: * timezone/zdump.c, timezone/zic.c: Copy verbatim from TZDB 2024a.
* Fix bsearch, qsort doc to match POSIX betterPaul Eggert2024-04-061-24/+36
| | | | | | | | | | | | | | | | | | | | | | * manual/search.texi (Array Search Function): Correct the statement about lfind’s mean runtime: it is proportional to a number (not that number), and this is true only if random elements are searched for. Relax the constraint on bsearch’s array argument: POSIX says it need not be sorted, only partially sorted. Say that the first arg passed to bsearch’s comparison function is the key, and the second arg is an array element, as POSIX requires. For bsearch and qsort, say that the comparison function should not alter the array, as POSIX requires. For qsort, say that the comparison function must define a total order, as POSIX requires, that it should not depend on element addresses, that the original array index can be used for stable sorts, and that if qsort still works if memory allocation fails. Be more consistent in calling the array elements “elements” rather than “objects”. Co-authored-by: Zack Weinberg <zack@owlfolio.org>
* x86-64: Exclude FMA4 IFUNC functions for -mapxfH.J. Lu2024-04-066-9/+70
| | | | | | | | | | When -mapxf is used to build glibc, the resulting glibc will never run on FMA4 machines. Exclude FMA4 IFUNC functions when -mapxf is used. This requires GCC which defines __APX_F__ for -mapxf with commit: 1df56719bd8 x86: Define __APX_F__ for -mapxf Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* Reinstate generic features-time64.hAdhemerval Zanella2024-04-051-0/+19
| | | | | | | The a4ed0471d7 removed the generic version which is included by features.h and used by Hurd. Checked by building i686-gnu and x86_64-gnu with build-many-glibc.py.
* Cleanup __tls_get_addr on alpha/microblaze localplt.dataAdhemerval Zanella2024-04-042-4/+0
| | | | | | They are not required. Checked with a make check for both ABIs.
* arm: Remove ld.so __tls_get_addr plt usageAdhemerval Zanella2024-04-042-3/+2
| | | | | | Use the hidden alias instead. Checked on arm-linux-gnueabihf.
* aarch64: Remove ld.so __tls_get_addr plt usageAdhemerval Zanella2024-04-042-3/+2
| | | | | | Use the hidden alias instead. Checked on aarch64-linux-gnu.
* math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603)Adhemerval Zanella2024-04-046-93/+87
| | | | | | | | | | | | | The implementations of trunc functions using x87 floating point (i386 and x86_64 long double only) traps when FE_INEXACT is enabled. Although this is a GNU extension outside the scope of the C standard, other architectures that also support traps do not show this behavior. The fix moves the implementation to a common one that holds any exceptions with a 'fnclex' (libc_feholdexcept_setround_387). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* math: x86 floor traps when FE_INEXACT is enabled (BZ 31601)Adhemerval Zanella2024-04-049-140/+144
| | | | | | | | | | | | | The implementations of floor functions using x87 floating point (i386 and 86_64 long double only) traps when FE_INEXACT is enabled. Although this is a GNU extension outside the scope of the C standard, other architectures that also support traps do not show this behavior. The fix moves the implementation to a common one that holds any exceptions with a 'fnclex' (libc_feholdexcept_setround_387). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600)Adhemerval Zanella2024-04-0410-141/+181
| | | | | | | | | | | | | The implementations of ceil functions using x87 floating point (i386 and x86_64 long double only) traps when FE_INEXACT is enabled. Although this is a GNU extension outside the scope of the C standard, other architectures that also support traps do not show this behavior. The fix moves the implementation to a common one that holds any exceptions with a 'fnclex' (libc_feholdexcept_setround_387). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* aarch64/fpu: Add vector variants of erfcJoe Ramsay2024-04-0417-1/+4897
| | | | Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>