crux-commits
Threads by month
- ----- 2025 -----
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
February 2024
- 1 participants
- 670 discussions
commit 84ba5a2026aa0ea7e4547335e9bf797daea27b42
Author: Juergen Daubert <jue(a)crux.nu>
Date: Sun Feb 11 13:14:55 2024 +0100
glibc-32: updated to version 2.39
diff --git a/glibc-32/.signature b/glibc-32/.signature
index a2f81ced..cd1a2021 100644
--- a/glibc-32/.signature
+++ b/glibc-32/.signature
@@ -1,9 +1,8 @@
untrusted comment: verify with /etc/ports/core.pub
-RWRJc1FUaeVeqpxXHrz/LhBrSqsAbkuQFm02Q/xOUc0dHZRBiqCmVta+eQjEP7CC8oJ32PN8+sRDe5O7ZFPPPBO1j1Wlw1I/YQE=
-SHA256 (Pkgfile) = 84a8ada7a68dafeac62c1f020b31f418e9c3b59146cb22749375f5c841da07d2
+RWRJc1FUaeVeqnEOaK7t0V76FIk+37UYCWevHvYlJQr9wZ7U1Jdfj4G9TCs+dBfYMv7nN6Mif9sihRd6xLNcYIRXODp/NvRBgQU=
+SHA256 (Pkgfile) = e6046c784c6a846bcc88103a4d4ccec7430f94b10dc4af4f5468eb7e74b74ba4
SHA256 (.footprint) = 4a527700ad49c691836c8e48c47b65014ccb665da203f933bc1fcb3e6e3148b8
-SHA256 (glibc-2.38.tar.xz) = fb82998998b2b29965467bc1b69d152e9c307d2cf301c9eafb4555b770ef3fd2
-SHA256 (linux-6.1.46.tar.xz) = f5f67bcfccd47f8d9db2d5ba24e33af7778f40a777577d1fba424f4a1712a296
-SHA256 (glibc-2.38-fhs-1.patch) = 643552db030e2f2d7ffde4f558e0f5f83d3fabf34a2e0e56ebdb49750ac27b0d
-SHA256 (glibc-2.38-1.patch) = 65627cd20480dada7311f68d11dcfb4167fbea9b4c1829f2c694a4d794f14c9a
+SHA256 (glibc-2.39.tar.xz) = f77bd47cf8170c57365ae7bf86696c118adb3b120d3259c64c502d3dc1e2d926
+SHA256 (linux-6.6.16.tar.xz) = b21d5795a3bead4f112916423222faa8a0f519e4201df343e3eb88dc9e4aaa30
+SHA256 (glibc-2.39-fhs-1.patch) = cbcece806ae8469fa3693fd181290b57045722b304cd2dd2a1cf3e160554f203
SHA256 (lib32.conf) = 2f174d2bcefe1c29327690514f34d6970fffdd54398320ca23a11b5f1e3c9b2d
diff --git a/glibc-32/Pkgfile b/glibc-32/Pkgfile
index 7a072066..22adead6 100644
--- a/glibc-32/Pkgfile
+++ b/glibc-32/Pkgfile
@@ -3,14 +3,15 @@
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=glibc-32
-version=2.38
-release=2
-_kernel_version=6.1.46
+version=2.39
+release=1
+_kernel_version=6.6.16
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
https://www.kernel.org/pub/linux/kernel/v6.x/linux-$_kernel_version.tar.xz
- glibc-2.38-fhs-1.patch
- glibc-$version-1.patch lib32.conf)
+ glibc-2.39-fhs-1.patch
+ #glibc-$version-1.patch
+ lib32.conf)
build() {
# install kernel headers
@@ -18,8 +19,8 @@ build() {
make -C $SRC/linux-$_kernel_version INSTALL_HDR_PATH=$PKG/usr headers_install
chown root:root $PKG/usr
- patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-$version-1.patch
- patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-2.38-fhs-1.patch
+ #patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-$version-1.patch
+ patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-2.39-fhs-1.patch
mkdir $SRC/build
cd $SRC/build
diff --git a/glibc-32/glibc-2.38-1.patch b/glibc-32/glibc-2.38-1.patch
deleted file mode 100644
index bfb58feb..00000000
--- a/glibc-32/glibc-2.38-1.patch
+++ /dev/null
@@ -1,1912 +0,0 @@
-diff --git a/NEWS b/NEWS
-index 872bc8907b..f117874e34 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,38 @@ See the end for copying conditions.
-
- Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
- using `glibc' in the "product" field.
-+
-+Version 2.38.1
-+
-+Security related changes:
-+
-+ CVE-2023-4527: If the system is configured in no-aaaa mode via
-+ /etc/resolv.conf, getaddrinfo is called for the AF_UNSPEC address
-+ family, and a DNS response is received over TCP that is larger than
-+ 2048 bytes, getaddrinfo may potentially disclose stack contents via
-+ the returned address data, or crash.
-+
-+ CVE-2023-4806: When an NSS plugin only implements the
-+ _gethostbyname2_r and _getcanonname_r callbacks, getaddrinfo could use
-+ memory that was freed during buffer resizing, potentially causing a
-+ crash or read or write to arbitrary memory.
-+
-+ CVE-2023-5156: The fix for CVE-2023-4806 introduced a memory leak when
-+ an application calls getaddrinfo for AF_INET6 with AI_CANONNAME,
-+ AI_ALL and AI_V4MAPPED flags set.
-+
-+ CVE-2023-4911: If a tunable of the form NAME=NAME=VAL is passed in the
-+ environment of a setuid program and NAME is valid, it may result in a
-+ buffer overflow, which could be exploited to achieve escalated
-+ privileges. This flaw was introduced in glibc 2.34.
-+
-+The following bugs are resolved with this release:
-+
-+ [30723] posix_memalign repeatedly scans long bin lists
-+ [30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with
-+ -D_FILE_OFFSET_BITS=64
-+ [30842] Stack read overflow in getaddrinfo in no-aaaa mode (CVE-2023-4527)
-+
-
- Version 2.38
-
-diff --git a/elf/dl-init.c b/elf/dl-init.c
-index 5b0732590f..ba4d2fdc85 100644
---- a/elf/dl-init.c
-+++ b/elf/dl-init.c
-@@ -25,10 +25,14 @@
- static void
- call_init (struct link_map *l, int argc, char **argv, char **env)
- {
-+ /* Do not run constructors for proxy objects. */
-+ if (l != l->l_real)
-+ return;
-+
- /* If the object has not been relocated, this is a bug. The
- function pointers are invalid in this case. (Executables do not
-- need relocation, and neither do proxy objects.) */
-- assert (l->l_real->l_relocated || l->l_real->l_type == lt_executable);
-+ need relocation.) */
-+ assert (l->l_relocated || l->l_type == lt_executable);
-
- if (l->l_init_called)
- /* This object is all done. */
-diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
-index 62b7332d95..cae67efa0a 100644
---- a/elf/dl-tunables.c
-+++ b/elf/dl-tunables.c
-@@ -180,11 +180,7 @@ parse_tunables (char *tunestr, char *valstring)
- /* If we reach the end of the string before getting a valid name-value
- pair, bail out. */
- if (p[len] == '\0')
-- {
-- if (__libc_enable_secure)
-- tunestr[off] = '\0';
-- return;
-- }
-+ break;
-
- /* We did not find a valid name-value pair before encountering the
- colon. */
-@@ -244,9 +240,16 @@ parse_tunables (char *tunestr, char *valstring)
- }
- }
-
-- if (p[len] != '\0')
-- p += len + 1;
-+ /* We reached the end while processing the tunable string. */
-+ if (p[len] == '\0')
-+ break;
-+
-+ p += len + 1;
- }
-+
-+ /* Terminate tunestr before we leave. */
-+ if (__libc_enable_secure)
-+ tunestr[off] = '\0';
- }
-
- /* Enable the glibc.malloc.check tunable in SETUID/SETGID programs only when
-diff --git a/elf/tst-env-setuid-tunables.c b/elf/tst-env-setuid-tunables.c
-index 7dfb0e073a..f0b92c97e7 100644
---- a/elf/tst-env-setuid-tunables.c
-+++ b/elf/tst-env-setuid-tunables.c
-@@ -50,6 +50,8 @@ const char *teststrings[] =
- "glibc.malloc.perturb=0x800:not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096",
- "glibc.not_valid.check=2:glibc.malloc.mmap_threshold=4096",
- "not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096",
-+ "glibc.malloc.mmap_threshold=glibc.malloc.mmap_threshold=4096",
-+ "glibc.malloc.check=2",
- "glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096:glibc.malloc.check=2",
- "glibc.malloc.check=4:glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096",
- ":glibc.malloc.garbage=2:glibc.malloc.check=1",
-@@ -68,6 +70,8 @@ const char *resultstrings[] =
- "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096",
- "glibc.malloc.mmap_threshold=4096",
- "glibc.malloc.mmap_threshold=4096",
-+ "glibc.malloc.mmap_threshold=glibc.malloc.mmap_threshold=4096",
-+ "",
- "",
- "",
- "",
-@@ -81,11 +85,18 @@ test_child (int off)
- {
- const char *val = getenv ("GLIBC_TUNABLES");
-
-+ printf (" [%d] GLIBC_TUNABLES is %s\n", off, val);
-+ fflush (stdout);
- if (val != NULL && strcmp (val, resultstrings[off]) == 0)
- return 0;
-
- if (val != NULL)
-- printf ("[%d] Unexpected GLIBC_TUNABLES VALUE %s\n", off, val);
-+ printf (" [%d] Unexpected GLIBC_TUNABLES VALUE %s, expected %s\n",
-+ off, val, resultstrings[off]);
-+ else
-+ printf (" [%d] GLIBC_TUNABLES environment variable absent\n", off);
-+
-+ fflush (stdout);
-
- return 1;
- }
-@@ -106,21 +117,26 @@ do_test (int argc, char **argv)
- if (ret != 0)
- exit (1);
-
-- exit (EXIT_SUCCESS);
-+ /* Special return code to make sure that the child executed all the way
-+ through. */
-+ exit (42);
- }
- else
- {
-- int ret = 0;
--
- /* Spawn tests. */
- for (int i = 0; i < array_length (teststrings); i++)
- {
- char buf[INT_BUFSIZE_BOUND (int)];
-
-- printf ("Spawned test for %s (%d)\n", teststrings[i], i);
-+ printf ("[%d] Spawned test for %s\n", i, teststrings[i]);
- snprintf (buf, sizeof (buf), "%d\n", i);
-+ fflush (stdout);
- if (setenv ("GLIBC_TUNABLES", teststrings[i], 1) != 0)
-- exit (1);
-+ {
-+ printf (" [%d] Failed to set GLIBC_TUNABLES: %m", i);
-+ support_record_failure ();
-+ continue;
-+ }
-
- int status = support_capture_subprogram_self_sgid (buf);
-
-@@ -128,9 +144,14 @@ do_test (int argc, char **argv)
- if (WEXITSTATUS (status) == EXIT_UNSUPPORTED)
- return EXIT_UNSUPPORTED;
-
-- ret |= status;
-+ if (WEXITSTATUS (status) != 42)
-+ {
-+ printf (" [%d] child failed with status %d\n", i,
-+ WEXITSTATUS (status));
-+ support_record_failure ();
-+ }
- }
-- return ret;
-+ return 0;
- }
- }
-
-diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
-index bee898c63c..cf32cf9b44 100644
---- a/iconv/iconv_prog.c
-+++ b/iconv/iconv_prog.c
-@@ -187,7 +187,7 @@ main (int argc, char *argv[])
-
- if (res != __GCONV_OK)
- {
-- if (errno == EINVAL)
-+ if (res == __GCONV_NOCONV || res == __GCONV_NODB)
- {
- /* Try to be nice with the user and tell her which of the
- two encoding names is wrong. This is possible because
-diff --git a/include/ifaddrs.h b/include/ifaddrs.h
-index 416118f1b3..19a3afb19f 100644
---- a/include/ifaddrs.h
-+++ b/include/ifaddrs.h
-@@ -34,9 +34,5 @@ extern void __check_native (uint32_t a1_index, int *a1_native,
- uint32_t a2_index, int *a2_native)
- attribute_hidden;
-
--#if IS_IN (nscd)
--extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
--#endif
--
- # endif /* !_ISOMAC */
- #endif /* ifaddrs.h */
-diff --git a/include/link.h b/include/link.h
-index 1d74feb2bd..69bda3ed17 100644
---- a/include/link.h
-+++ b/include/link.h
-@@ -278,6 +278,10 @@ struct link_map
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-
-+ /* Linked list of objects in reverse ELF constructor execution
-+ order. Head of list is stored in _dl_init_called_list. */
-+ struct link_map *l_init_called_next;
-+
- /* List of the dependencies introduced through symbol binding. */
- struct link_map_reldeps
- {
-diff --git a/inet/check_pf.c b/inet/check_pf.c
-index 5310c99121..6d1475920f 100644
---- a/inet/check_pf.c
-+++ b/inet/check_pf.c
-@@ -60,12 +60,3 @@ __free_in6ai (struct in6addrinfo *in6ai)
- {
- /* Nothing to do. */
- }
--
--
--#if IS_IN (nscd)
--uint32_t
--__bump_nl_timestamp (void)
--{
-- return 0;
--}
--#endif
-diff --git a/io/Makefile b/io/Makefile
-index 6ccc0e8691..8a3c83a3bb 100644
---- a/io/Makefile
-+++ b/io/Makefile
-@@ -192,6 +192,7 @@ tests := \
- tst-fchownat \
- tst-fcntl \
- tst-fcntl-lock \
-+ tst-fcntl-lock-lfs \
- tst-fstatat \
- tst-fts \
- tst-fts-lfs \
-diff --git a/io/tst-fcntl-lock-lfs.c b/io/tst-fcntl-lock-lfs.c
-new file mode 100644
-index 0000000000..f2a909fb02
---- /dev/null
-+++ b/io/tst-fcntl-lock-lfs.c
-@@ -0,0 +1,2 @@
-+#define _FILE_OFFSET_BITS 64
-+#include <io/tst-fcntl-lock.c>
-diff --git a/libio/vtables.c b/libio/vtables.c
-index 1d8ad612e9..34f7e15f1c 100644
---- a/libio/vtables.c
-+++ b/libio/vtables.c
-@@ -20,6 +20,7 @@
- #include <libioP.h>
- #include <stdio.h>
- #include <ldsodefs.h>
-+#include <array_length.h>
- #include <pointer_guard.h>
- #include <libio-macros.h>
-
-@@ -88,7 +89,7 @@
- # pragma weak __wprintf_buffer_as_file_xsputn
- #endif
-
--const struct _IO_jump_t __io_vtables[IO_VTABLES_LEN] attribute_relro =
-+const struct _IO_jump_t __io_vtables[] attribute_relro =
- {
- /* _IO_str_jumps */
- [IO_STR_JUMPS] =
-@@ -485,6 +486,8 @@ const struct _IO_jump_t __io_vtables[IO_VTABLES_LEN] attribute_relro =
- },
- #endif
- };
-+_Static_assert (array_length (__io_vtables) == IO_VTABLES_NUM,
-+ "initializer count");
-
- #ifdef SHARED
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index e2f1a615a4..d0bbbf3710 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -1086,6 +1086,11 @@ typedef struct malloc_chunk* mchunkptr;
-
- static void* _int_malloc(mstate, size_t);
- static void _int_free(mstate, mchunkptr, int);
-+static void _int_free_merge_chunk (mstate, mchunkptr, INTERNAL_SIZE_T);
-+static INTERNAL_SIZE_T _int_free_create_chunk (mstate,
-+ mchunkptr, INTERNAL_SIZE_T,
-+ mchunkptr, INTERNAL_SIZE_T);
-+static void _int_free_maybe_consolidate (mstate, INTERNAL_SIZE_T);
- static void* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
- INTERNAL_SIZE_T);
- static void* _int_memalign(mstate, size_t, size_t);
-@@ -4483,12 +4488,6 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- {
- INTERNAL_SIZE_T size; /* its size */
- mfastbinptr *fb; /* associated fastbin */
-- mchunkptr nextchunk; /* next contiguous chunk */
-- INTERNAL_SIZE_T nextsize; /* its size */
-- int nextinuse; /* true if nextchunk is used */
-- INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr fwd; /* misc temp for linking */
-
- size = chunksize (p);
-
-@@ -4637,31 +4636,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- if (!have_lock)
- __libc_lock_lock (av->mutex);
-
-- nextchunk = chunk_at_offset(p, size);
--
-- /* Lightweight tests: check whether the block is already the
-- top block. */
-- if (__glibc_unlikely (p == av->top))
-- malloc_printerr ("double free or corruption (top)");
-- /* Or whether the next chunk is beyond the boundaries of the arena. */
-- if (__builtin_expect (contiguous (av)
-- && (char *) nextchunk
-- >= ((char *) av->top + chunksize(av->top)), 0))
-- malloc_printerr ("double free or corruption (out)");
-- /* Or whether the block is actually not marked used. */
-- if (__glibc_unlikely (!prev_inuse(nextchunk)))
-- malloc_printerr ("double free or corruption (!prev)");
--
-- nextsize = chunksize(nextchunk);
-- if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-- || __builtin_expect (nextsize >= av->system_mem, 0))
-- malloc_printerr ("free(): invalid next size (normal)");
-+ _int_free_merge_chunk (av, p, size);
-
-- free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-+ if (!have_lock)
-+ __libc_lock_unlock (av->mutex);
-+ }
-+ /*
-+ If the chunk was allocated via mmap, release via munmap().
-+ */
-
-- /* consolidate backward */
-- if (!prev_inuse(p)) {
-- prevsize = prev_size (p);
-+ else {
-+ munmap_chunk (p);
-+ }
-+}
-+
-+/* Try to merge chunk P of SIZE bytes with its neighbors. Put the
-+ resulting chunk on the appropriate bin list. P must not be on a
-+ bin list yet, and it can be in use. */
-+static void
-+_int_free_merge_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size)
-+{
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+
-+ /* Lightweight tests: check whether the block is already the
-+ top block. */
-+ if (__glibc_unlikely (p == av->top))
-+ malloc_printerr ("double free or corruption (top)");
-+ /* Or whether the next chunk is beyond the boundaries of the arena. */
-+ if (__builtin_expect (contiguous (av)
-+ && (char *) nextchunk
-+ >= ((char *) av->top + chunksize(av->top)), 0))
-+ malloc_printerr ("double free or corruption (out)");
-+ /* Or whether the block is actually not marked used. */
-+ if (__glibc_unlikely (!prev_inuse(nextchunk)))
-+ malloc_printerr ("double free or corruption (!prev)");
-+
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-+ || __builtin_expect (nextsize >= av->system_mem, 0))
-+ malloc_printerr ("free(): invalid next size (normal)");
-+
-+ free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-+
-+ /* Consolidate backward. */
-+ if (!prev_inuse(p))
-+ {
-+ INTERNAL_SIZE_T prevsize = prev_size (p);
- size += prevsize;
- p = chunk_at_offset(p, -((long) prevsize));
- if (__glibc_unlikely (chunksize(p) != prevsize))
-@@ -4669,9 +4689,25 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- unlink_chunk (av, p);
- }
-
-- if (nextchunk != av->top) {
-+ /* Write the chunk header, maybe after merging with the following chunk. */
-+ size = _int_free_create_chunk (av, p, size, nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, size);
-+}
-+
-+/* Create a chunk at P of SIZE bytes, with SIZE potentially increased
-+ to cover the immediately following chunk NEXTCHUNK of NEXTSIZE
-+ bytes (if NEXTCHUNK is unused). The chunk at P is not actually
-+ read and does not have to be initialized. After creation, it is
-+ placed on the appropriate bin list. The function returns the size
-+ of the new chunk. */
-+static INTERNAL_SIZE_T
-+_int_free_create_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size,
-+ mchunkptr nextchunk, INTERNAL_SIZE_T nextsize)
-+{
-+ if (nextchunk != av->top)
-+ {
- /* get and clear inuse bit */
-- nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
-+ bool nextinuse = inuse_bit_at_offset (nextchunk, nextsize);
-
- /* consolidate forward */
- if (!nextinuse) {
-@@ -4686,8 +4722,8 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- been given one chance to be used in malloc.
- */
-
-- bck = unsorted_chunks(av);
-- fwd = bck->fd;
-+ mchunkptr bck = unsorted_chunks (av);
-+ mchunkptr fwd = bck->fd;
- if (__glibc_unlikely (fwd->bk != bck))
- malloc_printerr ("free(): corrupted unsorted chunks");
- p->fd = fwd;
-@@ -4706,61 +4742,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- check_free_chunk(av, p);
- }
-
-- /*
-- If the chunk borders the current high end of memory,
-- consolidate into top
-- */
--
-- else {
-+ else
-+ {
-+ /* If the chunk borders the current high end of memory,
-+ consolidate into top. */
- size += nextsize;
- set_head(p, size | PREV_INUSE);
- av->top = p;
- check_chunk(av, p);
- }
-
-- /*
-- If freeing a large space, consolidate possibly-surrounding
-- chunks. Then, if the total unused topmost memory exceeds trim
-- threshold, ask malloc_trim to reduce top.
--
-- Unless max_fast is 0, we don't know if there are fastbins
-- bordering top, so we cannot tell for sure whether threshold
-- has been reached unless fastbins are consolidated. But we
-- don't want to consolidate on each free. As a compromise,
-- consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD
-- is reached.
-- */
-+ return size;
-+}
-
-- if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {
-+/* If freeing a large space, consolidate possibly-surrounding
-+ chunks. Then, if the total unused topmost memory exceeds trim
-+ threshold, ask malloc_trim to reduce top. */
-+static void
-+_int_free_maybe_consolidate (mstate av, INTERNAL_SIZE_T size)
-+{
-+ /* Unless max_fast is 0, we don't know if there are fastbins
-+ bordering top, so we cannot tell for sure whether threshold has
-+ been reached unless fastbins are consolidated. But we don't want
-+ to consolidate on each free. As a compromise, consolidation is
-+ performed if FASTBIN_CONSOLIDATION_THRESHOLD is reached. */
-+ if (size >= FASTBIN_CONSOLIDATION_THRESHOLD)
-+ {
- if (atomic_load_relaxed (&av->have_fastchunks))
- malloc_consolidate(av);
-
-- if (av == &main_arena) {
-+ if (av == &main_arena)
-+ {
- #ifndef MORECORE_CANNOT_TRIM
-- if ((unsigned long)(chunksize(av->top)) >=
-- (unsigned long)(mp_.trim_threshold))
-- systrim(mp_.top_pad, av);
-+ if (chunksize (av->top) >= mp_.trim_threshold)
-+ systrim (mp_.top_pad, av);
- #endif
-- } else {
-- /* Always try heap_trim(), even if the top chunk is not
-- large, because the corresponding heap might go away. */
-- heap_info *heap = heap_for_ptr(top(av));
-+ }
-+ else
-+ {
-+ /* Always try heap_trim, even if the top chunk is not large,
-+ because the corresponding heap might go away. */
-+ heap_info *heap = heap_for_ptr (top (av));
-
-- assert(heap->ar_ptr == av);
-- heap_trim(heap, mp_.top_pad);
-- }
-+ assert (heap->ar_ptr == av);
-+ heap_trim (heap, mp_.top_pad);
-+ }
- }
--
-- if (!have_lock)
-- __libc_lock_unlock (av->mutex);
-- }
-- /*
-- If the chunk was allocated via mmap, release via munmap().
-- */
--
-- else {
-- munmap_chunk (p);
-- }
- }
-
- /*
-@@ -4999,42 +5026,6 @@ _int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
- ------------------------------ memalign ------------------------------
- */
-
--/* Returns 0 if the chunk is not and does not contain the requested
-- aligned sub-chunk, else returns the amount of "waste" from
-- trimming. NB is the *chunk* byte size, not the user byte
-- size. */
--static size_t
--chunk_ok_for_memalign (mchunkptr p, size_t alignment, size_t nb)
--{
-- void *m = chunk2mem (p);
-- INTERNAL_SIZE_T size = chunksize (p);
-- void *aligned_m = m;
--
-- if (__glibc_unlikely (misaligned_chunk (p)))
-- malloc_printerr ("_int_memalign(): unaligned chunk detected");
--
-- aligned_m = PTR_ALIGN_UP (m, alignment);
--
-- INTERNAL_SIZE_T front_extra = (intptr_t) aligned_m - (intptr_t) m;
--
-- /* We can't trim off the front as it's too small. */
-- if (front_extra > 0 && front_extra < MINSIZE)
-- return 0;
--
-- /* If it's a perfect fit, it's an exception to the return value rule
-- (we would return zero waste, which looks like "not usable"), so
-- handle it here by returning a small non-zero value instead. */
-- if (size == nb && front_extra == 0)
-- return 1;
--
-- /* If the block we need fits in the chunk, calculate total waste. */
-- if (size > nb + front_extra)
-- return size - nb;
--
-- /* Can't use this chunk. */
-- return 0;
--}
--
- /* BYTES is user requested bytes, not requested chunksize bytes. */
- static void *
- _int_memalign (mstate av, size_t alignment, size_t bytes)
-@@ -5049,7 +5040,6 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- mchunkptr remainder; /* spare room at end to split off */
- unsigned long remainder_size; /* its size */
- INTERNAL_SIZE_T size;
-- mchunkptr victim;
-
- nb = checked_request2size (bytes);
- if (nb == 0)
-@@ -5068,129 +5058,13 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- we don't find anything in those bins, the common malloc code will
- scan starting at 2x. */
-
-- /* This will be set if we found a candidate chunk. */
-- victim = NULL;
-+ /* Call malloc with worst case padding to hit alignment. */
-+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
-
-- /* Fast bins are singly-linked, hard to remove a chunk from the middle
-- and unlikely to meet our alignment requirements. We have not done
-- any experimentation with searching for aligned fastbins. */
--
-- if (av != NULL)
-- {
-- int first_bin_index;
-- int first_largebin_index;
-- int last_bin_index;
--
-- if (in_smallbin_range (nb))
-- first_bin_index = smallbin_index (nb);
-- else
-- first_bin_index = largebin_index (nb);
-+ if (m == 0)
-+ return 0; /* propagate failure */
-
-- if (in_smallbin_range (nb * 2))
-- last_bin_index = smallbin_index (nb * 2);
-- else
-- last_bin_index = largebin_index (nb * 2);
--
-- first_largebin_index = largebin_index (MIN_LARGE_SIZE);
--
-- int victim_index; /* its bin index */
--
-- for (victim_index = first_bin_index;
-- victim_index < last_bin_index;
-- victim_index ++)
-- {
-- victim = NULL;
--
-- if (victim_index < first_largebin_index)
-- {
-- /* Check small bins. Small bin chunks are doubly-linked despite
-- being the same size. */
--
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
-- while (fwd != bck)
-- {
-- if (chunk_ok_for_memalign (fwd, alignment, nb) > 0)
-- {
-- victim = fwd;
--
-- /* Unlink it */
-- victim->fd->bk = victim->bk;
-- victim->bk->fd = victim->fd;
-- break;
-- }
--
-- fwd = fwd->fd;
-- }
-- }
-- else
-- {
-- /* Check large bins. */
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr best = NULL;
-- size_t best_size = 0;
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
--
-- while (fwd != bck)
-- {
-- int extra;
--
-- if (chunksize (fwd) < nb)
-- break;
-- extra = chunk_ok_for_memalign (fwd, alignment, nb);
-- if (extra > 0
-- && (extra <= best_size || best == NULL))
-- {
-- best = fwd;
-- best_size = extra;
-- }
--
-- fwd = fwd->fd;
-- }
-- victim = best;
--
-- if (victim != NULL)
-- {
-- unlink_chunk (av, victim);
-- break;
-- }
-- }
--
-- if (victim != NULL)
-- break;
-- }
-- }
--
-- /* Strategy: find a spot within that chunk that meets the alignment
-- request, and then possibly free the leading and trailing space.
-- This strategy is incredibly costly and can lead to external
-- fragmentation if header and footer chunks are unused. */
--
-- if (victim != NULL)
-- {
-- p = victim;
-- m = chunk2mem (p);
-- set_inuse (p);
-- if (av != &main_arena)
-- set_non_main_arena (p);
-- }
-- else
-- {
-- /* Call malloc with worst case padding to hit alignment. */
--
-- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
--
-- if (m == 0)
-- return 0; /* propagate failure */
--
-- p = mem2chunk (m);
-- }
-+ p = mem2chunk (m);
-
- if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
- {
-@@ -5221,7 +5095,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- (av != &main_arena ? NON_MAIN_ARENA : 0));
- set_inuse_bit_at_offset (newp, newsize);
- set_head_size (p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
-- _int_free (av, p, 1);
-+ _int_free_merge_chunk (av, p, leadsize);
- p = newp;
-
- assert (newsize >= nb &&
-@@ -5232,15 +5106,27 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- if (!chunk_is_mmapped (p))
- {
- size = chunksize (p);
-- if ((unsigned long) (size) > (unsigned long) (nb + MINSIZE))
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (size > nb)
- {
- remainder_size = size - nb;
-- remainder = chunk_at_offset (p, nb);
-- set_head (remainder, remainder_size | PREV_INUSE |
-- (av != &main_arena ? NON_MAIN_ARENA : 0));
-- set_head_size (p, nb);
-- _int_free (av, remainder, 1);
-- }
-+ if (remainder_size >= MINSIZE
-+ || nextchunk == av->top
-+ || !inuse_bit_at_offset (nextchunk, nextsize))
-+ {
-+ /* We can only give back the tail if it is larger than
-+ MINSIZE, or if the following chunk is unused (top
-+ chunk or unused in-heap chunk). Otherwise we would
-+ create a chunk that is smaller than MINSIZE. */
-+ remainder = chunk_at_offset (p, nb);
-+ set_head_size (p, nb);
-+ remainder_size = _int_free_create_chunk (av, remainder,
-+ remainder_size,
-+ nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, remainder_size);
-+ }
-+ }
- }
-
- check_inuse_chunk (av, p);
-diff --git a/malloc/tst-memalign-2.c b/malloc/tst-memalign-2.c
-index f229283dbf..ecd6fa249e 100644
---- a/malloc/tst-memalign-2.c
-+++ b/malloc/tst-memalign-2.c
-@@ -86,7 +86,8 @@ do_test (void)
- TEST_VERIFY (tcache_allocs[i].ptr1 == tcache_allocs[i].ptr2);
- }
-
-- /* Test for non-head tcache hits. */
-+ /* Test for non-head tcache hits. This exercises the memalign
-+ scanning code to find matching allocations. */
- for (i = 0; i < array_length (ptr); ++ i)
- {
- if (i == 4)
-@@ -113,7 +114,9 @@ do_test (void)
- free (p);
- TEST_VERIFY (count > 0);
-
-- /* Large bins test. */
-+ /* Large bins test. This verifies that the over-allocated parts
-+ that memalign releases for future allocations can be reused by
-+ memalign itself at least in some cases. */
-
- for (i = 0; i < LN; ++ i)
- {
-diff --git a/manual/job.texi b/manual/job.texi
-index 42cb9fb26d..8157f13a1c 100644
---- a/manual/job.texi
-+++ b/manual/job.texi
-@@ -1133,6 +1133,7 @@ following @code{errno} error conditions are defined for this function:
- @table @code
- @item ESRCH
- There is no process with the given process ID @var{pid}.
-+@item EPERM
- The calling process and the process specified by @var{pid} are in
- different sessions, and the implementation doesn't allow to access the
- process group ID of the process with ID @var{pid} from the calling
-diff --git a/nscd/Makefile b/nscd/Makefile
-index 2a0489f4cf..16b6460ee9 100644
---- a/nscd/Makefile
-+++ b/nscd/Makefile
-@@ -35,7 +35,7 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \
- getgrnam_r getgrgid_r hstcache gethstbyad_r gethstbynm3_r \
- getsrvbynm_r getsrvbypt_r servicescache \
- dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
-- xmalloc xstrdup aicache initgrcache gai res_hconf \
-+ xmalloc xstrdup aicache initgrcache res_hconf \
- netgroupcache cachedumper
-
- ifeq ($(build-nscd)$(have-thread-library),yesyes)
-diff --git a/nscd/connections.c b/nscd/connections.c
-index a405a44a9b..15693e5090 100644
---- a/nscd/connections.c
-+++ b/nscd/connections.c
-@@ -256,6 +256,17 @@ int inotify_fd = -1;
- #ifdef HAVE_NETLINK
- /* Descriptor for netlink status updates. */
- static int nl_status_fd = -1;
-+
-+static uint32_t
-+__bump_nl_timestamp (void)
-+{
-+ static uint32_t nl_timestamp;
-+
-+ if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 == 0)
-+ atomic_fetch_add_relaxed (&nl_timestamp, 1);
-+
-+ return nl_timestamp;
-+}
- #endif
-
- /* Number of times clients had to wait. */
-diff --git a/nscd/gai.c b/nscd/gai.c
-deleted file mode 100644
-index e29f3fe583..0000000000
---- a/nscd/gai.c
-+++ /dev/null
-@@ -1,50 +0,0 @@
--/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published
-- by the Free Software Foundation; version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, see <https://www.gnu.org/licenses/>. */
--
--#include <alloca.h>
--#include <sys/stat.h>
--
--/* This file uses the getaddrinfo code but it compiles it without NSCD
-- support. We just need a few symbol renames. */
--#define __ioctl ioctl
--#define __getsockname getsockname
--#define __socket socket
--#define __recvmsg recvmsg
--#define __bind bind
--#define __sendto sendto
--#define __strchrnul strchrnul
--#define __getline getline
--#define __qsort_r qsort_r
--/* nscd uses 1MB or 2MB thread stacks. */
--#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
--#define __getifaddrs getifaddrs
--#define __freeifaddrs freeifaddrs
--#undef __fstat64
--#define __fstat64 fstat64
--#undef __stat64
--#define __stat64 stat64
--
--/* We are nscd, so we don't want to be talking to ourselves. */
--#undef USE_NSCD
--
--#include <getaddrinfo.c>
--
--/* Support code. */
--#include <check_pf.c>
--#include <check_native.c>
--
--/* Some variables normally defined in libc. */
--nss_action_list __nss_hosts_database attribute_hidden;
-diff --git a/nss/Makefile b/nss/Makefile
-index 06fcdc450f..668ba34b18 100644
---- a/nss/Makefile
-+++ b/nss/Makefile
-@@ -82,6 +82,7 @@ tests-container := \
- tst-nss-test3 \
- tst-reload1 \
- tst-reload2 \
-+ tst-nss-gai-hv2-canonname \
- # tests-container
-
- # Tests which need libdl
-@@ -145,7 +146,17 @@ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
- ifeq ($(build-static-nss),yes)
- tests-static += tst-nss-static
- endif
--extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os
-+extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os \
-+ nss_test_gai_hv2_canonname.os
-+
-+ifeq ($(run-built-tests),yes)
-+ifneq (no,$(PERL))
-+tests-special += $(objpfx)mtrace-tst-nss-gai-hv2-canonname.out
-+endif
-+endif
-+
-+generated += mtrace-tst-nss-gai-hv2-canonname.out \
-+ tst-nss-gai-hv2-canonname.mtrace
-
- include ../Rules
-
-@@ -180,12 +191,16 @@ rtld-tests-LDFLAGS += -Wl,--dynamic-list=nss_test.ver
- libof-nss_test1 = extramodules
- libof-nss_test2 = extramodules
- libof-nss_test_errno = extramodules
-+libof-nss_test_gai_hv2_canonname = extramodules
- $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
- $(build-module)
- $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps)
- $(build-module)
- $(objpfx)/libnss_test_errno.so: $(objpfx)nss_test_errno.os $(link-libc-deps)
- $(build-module)
-+$(objpfx)/libnss_test_gai_hv2_canonname.so: \
-+ $(objpfx)nss_test_gai_hv2_canonname.os $(link-libc-deps)
-+ $(build-module)
- $(objpfx)nss_test2.os : nss_test1.c
- # Use the nss_files suffix for these objects as well.
- $(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so
-@@ -195,10 +210,14 @@ $(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so
- $(objpfx)/libnss_test_errno.so$(libnss_files.so-version): \
- $(objpfx)/libnss_test_errno.so
- $(make-link)
-+$(objpfx)/libnss_test_gai_hv2_canonname.so$(libnss_files.so-version): \
-+ $(objpfx)/libnss_test_gai_hv2_canonname.so
-+ $(make-link)
- $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \
- $(objpfx)/libnss_test1.so$(libnss_files.so-version) \
- $(objpfx)/libnss_test2.so$(libnss_files.so-version) \
-- $(objpfx)/libnss_test_errno.so$(libnss_files.so-version)
-+ $(objpfx)/libnss_test_errno.so$(libnss_files.so-version) \
-+ $(objpfx)/libnss_test_gai_hv2_canonname.so$(libnss_files.so-version)
-
- ifeq (yes,$(have-thread-library))
- $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library)
-@@ -207,6 +226,17 @@ endif
- $(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so
- $(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so
-
-+tst-nss-gai-hv2-canonname-ENV = \
-+ MALLOC_TRACE=$(objpfx)tst-nss-gai-hv2-canonname.mtrace \
-+ LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
-+$(objpfx)mtrace-tst-nss-gai-hv2-canonname.out: \
-+ $(objpfx)tst-nss-gai-hv2-canonname.out
-+ { test -r $(objpfx)tst-nss-gai-hv2-canonname.mtrace \
-+ || ( echo "tst-nss-gai-hv2-canonname.mtrace does not exist"; exit 77; ) \
-+ && $(common-objpfx)malloc/mtrace \
-+ $(objpfx)tst-nss-gai-hv2-canonname.mtrace; } > $@; \
-+ $(evaluate-test)
-+
- # Disable DT_RUNPATH on NSS tests so that the glibc internal NSS
- # functions can load testing NSS modules via DT_RPATH.
- LDFLAGS-tst-nss-test1 = -Wl,--disable-new-dtags
-@@ -215,3 +245,4 @@ LDFLAGS-tst-nss-test3 = -Wl,--disable-new-dtags
- LDFLAGS-tst-nss-test4 = -Wl,--disable-new-dtags
- LDFLAGS-tst-nss-test5 = -Wl,--disable-new-dtags
- LDFLAGS-tst-nss-test_errno = -Wl,--disable-new-dtags
-+LDFLAGS-tst-nss-test_gai_hv2_canonname = -Wl,--disable-new-dtags
-diff --git a/nss/nss_test_gai_hv2_canonname.c b/nss/nss_test_gai_hv2_canonname.c
-new file mode 100644
-index 0000000000..4439c83c9f
---- /dev/null
-+++ b/nss/nss_test_gai_hv2_canonname.c
-@@ -0,0 +1,56 @@
-+/* NSS service provider that only provides gethostbyname2_r.
-+ Copyright The GNU Toolchain Authors.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <https://www.gnu.org/licenses/>. */
-+
-+#include <nss.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include "nss/tst-nss-gai-hv2-canonname.h"
-+
-+/* Catch misnamed and functions. */
-+#pragma GCC diagnostic error "-Wmissing-prototypes"
-+NSS_DECLARE_MODULE_FUNCTIONS (test_gai_hv2_canonname)
-+
-+extern enum nss_status _nss_files_gethostbyname2_r (const char *, int,
-+ struct hostent *, char *,
-+ size_t, int *, int *);
-+
-+enum nss_status
-+_nss_test_gai_hv2_canonname_gethostbyname2_r (const char *name, int af,
-+ struct hostent *result,
-+ char *buffer, size_t buflen,
-+ int *errnop, int *herrnop)
-+{
-+ return _nss_files_gethostbyname2_r (name, af, result, buffer, buflen, errnop,
-+ herrnop);
-+}
-+
-+enum nss_status
-+_nss_test_gai_hv2_canonname_getcanonname_r (const char *name, char *buffer,
-+ size_t buflen, char **result,
-+ int *errnop, int *h_errnop)
-+{
-+ /* We expect QUERYNAME, which is a small enough string that it shouldn't fail
-+ the test. */
-+ if (memcmp (QUERYNAME, name, sizeof (QUERYNAME))
-+ || buflen < sizeof (QUERYNAME))
-+ abort ();
-+
-+ strncpy (buffer, name, buflen);
-+ *result = buffer;
-+ return NSS_STATUS_SUCCESS;
-+}
-diff --git a/nss/tst-nss-gai-hv2-canonname.c b/nss/tst-nss-gai-hv2-canonname.c
-new file mode 100644
-index 0000000000..7db53cf09d
---- /dev/null
-+++ b/nss/tst-nss-gai-hv2-canonname.c
-@@ -0,0 +1,66 @@
-+/* Test NSS query path for plugins that only implement gethostbyname2
-+ (#30843).
-+ Copyright The GNU Toolchain Authors.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <https://www.gnu.org/licenses/>. */
-+
-+#include <nss.h>
-+#include <netdb.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <mcheck.h>
-+#include <support/check.h>
-+#include <support/xstdio.h>
-+#include "nss/tst-nss-gai-hv2-canonname.h"
-+
-+#define PREPARE do_prepare
-+
-+static void do_prepare (int a, char **av)
-+{
-+ FILE *hosts = xfopen ("/etc/hosts", "w");
-+ for (unsigned i = 2; i < 255; i++)
-+ {
-+ fprintf (hosts, "ff01::ff02:ff03:%u:2\ttest.example.com\n", i);
-+ fprintf (hosts, "192.168.0.%u\ttest.example.com\n", i);
-+ }
-+ xfclose (hosts);
-+}
-+
-+static int
-+do_test (void)
-+{
-+ mtrace ();
-+
-+ __nss_configure_lookup ("hosts", "test_gai_hv2_canonname");
-+
-+ struct addrinfo hints = {};
-+ struct addrinfo *result = NULL;
-+
-+ hints.ai_family = AF_INET6;
-+ hints.ai_flags = AI_ALL | AI_V4MAPPED | AI_CANONNAME;
-+
-+ int ret = getaddrinfo (QUERYNAME, NULL, &hints, &result);
-+
-+ if (ret != 0)
-+ FAIL_EXIT1 ("getaddrinfo failed: %s\n", gai_strerror (ret));
-+
-+ TEST_COMPARE_STRING (result->ai_canonname, QUERYNAME);
-+
-+ freeaddrinfo(result);
-+ return 0;
-+}
-+
-+#include <support/test-driver.c>
-diff --git a/nss/tst-nss-gai-hv2-canonname.h b/nss/tst-nss-gai-hv2-canonname.h
-new file mode 100644
-index 0000000000..14f2a9cb08
---- /dev/null
-+++ b/nss/tst-nss-gai-hv2-canonname.h
-@@ -0,0 +1 @@
-+#define QUERYNAME "test.example.com"
-diff --git a/nss/tst-nss-gai-hv2-canonname.root/postclean.req b/nss/tst-nss-gai-hv2-canonname.root/postclean.req
-new file mode 100644
-index 0000000000..e69de29bb2
-diff --git a/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script b/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script
-new file mode 100644
-index 0000000000..31848b4a28
---- /dev/null
-+++ b/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script
-@@ -0,0 +1,2 @@
-+cp $B/nss/libnss_test_gai_hv2_canonname.so $L/libnss_test_gai_hv2_canonname.so.2
-+su
-diff --git a/resolv/Makefile b/resolv/Makefile
-index 054b1fa36c..2f99eb3862 100644
---- a/resolv/Makefile
-+++ b/resolv/Makefile
-@@ -102,6 +102,7 @@ tests += \
- tst-resolv-invalid-cname \
- tst-resolv-network \
- tst-resolv-noaaaa \
-+ tst-resolv-noaaaa-vc \
- tst-resolv-nondecimal \
- tst-resolv-res_init-multi \
- tst-resolv-search \
-@@ -293,6 +294,7 @@ $(objpfx)tst-resolv-res_init-thread: $(objpfx)libresolv.so \
- $(objpfx)tst-resolv-invalid-cname: $(objpfx)libresolv.so \
- $(shared-thread-library)
- $(objpfx)tst-resolv-noaaaa: $(objpfx)libresolv.so $(shared-thread-library)
-+$(objpfx)tst-resolv-noaaaa-vc: $(objpfx)libresolv.so $(shared-thread-library)
- $(objpfx)tst-resolv-nondecimal: $(objpfx)libresolv.so $(shared-thread-library)
- $(objpfx)tst-resolv-qtypes: $(objpfx)libresolv.so $(shared-thread-library)
- $(objpfx)tst-resolv-rotate: $(objpfx)libresolv.so $(shared-thread-library)
-diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
-index 1d60c51f5e..5d0ab30de6 100644
---- a/resolv/nss_dns/dns-host.c
-+++ b/resolv/nss_dns/dns-host.c
-@@ -427,7 +427,7 @@ _nss_dns_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
- {
- n = __res_context_search (ctx, name, C_IN, T_A,
- dns_packet_buffer, sizeof (dns_packet_buffer),
-- NULL, NULL, NULL, NULL, NULL);
-+ &alt_dns_packet_buffer, NULL, NULL, NULL, NULL);
- if (n >= 0)
- status = gaih_getanswer_noaaaa (alt_dns_packet_buffer, n,
- &abuf, pat, errnop, herrnop, ttlp);
-diff --git a/resolv/tst-resolv-noaaaa-vc.c b/resolv/tst-resolv-noaaaa-vc.c
-new file mode 100644
-index 0000000000..9f5aebd99f
---- /dev/null
-+++ b/resolv/tst-resolv-noaaaa-vc.c
-@@ -0,0 +1,129 @@
-+/* Test the RES_NOAAAA resolver option with a large response.
-+ Copyright (C) 2022-2023 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <https://www.gnu.org/licenses/>. */
-+
-+#include <errno.h>
-+#include <netdb.h>
-+#include <resolv.h>
-+#include <stdbool.h>
-+#include <stdlib.h>
-+#include <support/check.h>
-+#include <support/check_nss.h>
-+#include <support/resolv_test.h>
-+#include <support/support.h>
-+#include <support/xmemstream.h>
-+
-+/* Used to keep track of the number of queries. */
-+static volatile unsigned int queries;
-+
-+/* If true, add a large TXT record at the start of the answer section. */
-+static volatile bool stuff_txt;
-+
-+static void
-+response (const struct resolv_response_context *ctx,
-+ struct resolv_response_builder *b,
-+ const char *qname, uint16_t qclass, uint16_t qtype)
-+{
-+ /* If not using TCP, just force its use. */
-+ if (!ctx->tcp)
-+ {
-+ struct resolv_response_flags flags = {.tc = true};
-+ resolv_response_init (b, flags);
-+ resolv_response_add_question (b, qname, qclass, qtype);
-+ return;
-+ }
-+
-+ /* The test needs to send four queries, the first three are used to
-+ grow the NSS buffer via the ERANGE handshake. */
-+ ++queries;
-+ TEST_VERIFY (queries <= 4);
-+
-+ /* AAAA queries are supposed to be disabled. */
-+ TEST_COMPARE (qtype, T_A);
-+ TEST_COMPARE (qclass, C_IN);
-+ TEST_COMPARE_STRING (qname, "example.com");
-+
-+ struct resolv_response_flags flags = {};
-+ resolv_response_init (b, flags);
-+ resolv_response_add_question (b, qname, qclass, qtype);
-+
-+ resolv_response_section (b, ns_s_an);
-+
-+ if (stuff_txt)
-+ {
-+ resolv_response_open_record (b, qname, qclass, T_TXT, 60);
-+ int zero = 0;
-+ for (int i = 0; i <= 15000; ++i)
-+ resolv_response_add_data (b, &zero, sizeof (zero));
-+ resolv_response_close_record (b);
-+ }
-+
-+ for (int i = 0; i < 200; ++i)
-+ {
-+ resolv_response_open_record (b, qname, qclass, qtype, 60);
-+ char ipv4[4] = {192, 0, 2, i + 1};
-+ resolv_response_add_data (b, &ipv4, sizeof (ipv4));
-+ resolv_response_close_record (b);
-+ }
-+}
-+
-+static int
-+do_test (void)
-+{
-+ struct resolv_test *obj = resolv_test_start
-+ ((struct resolv_redirect_config)
-+ {
-+ .response_callback = response
-+ });
-+
-+ _res.options |= RES_NOAAAA;
-+
-+ for (int do_stuff_txt = 0; do_stuff_txt < 2; ++do_stuff_txt)
-+ {
-+ queries = 0;
-+ stuff_txt = do_stuff_txt;
-+
-+ struct addrinfo *ai = NULL;
-+ int ret;
-+ ret = getaddrinfo ("example.com", "80",
-+ &(struct addrinfo)
-+ {
-+ .ai_family = AF_UNSPEC,
-+ .ai_socktype = SOCK_STREAM,
-+ }, &ai);
-+
-+ char *expected_result;
-+ {
-+ struct xmemstream mem;
-+ xopen_memstream (&mem);
-+ for (int i = 0; i < 200; ++i)
-+ fprintf (mem.out, "address: STREAM/TCP 192.0.2.%d 80\n", i + 1);
-+ xfclose_memstream (&mem);
-+ expected_result = mem.buffer;
-+ }
-+
-+ check_addrinfo ("example.com", ai, ret, expected_result);
-+
-+ free (expected_result);
-+ freeaddrinfo (ai);
-+ }
-+
-+ resolv_test_end (obj);
-+ return 0;
-+}
-+
-+#include <support/test-driver.c>
-diff --git a/stdlib/tst-realpath.c b/stdlib/tst-realpath.c
-index f325c95a44..3694ecd8af 100644
---- a/stdlib/tst-realpath.c
-+++ b/stdlib/tst-realpath.c
-@@ -24,6 +24,7 @@
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-+#include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <malloc.h>
-@@ -50,7 +51,11 @@ void dealloc (void *p)
-
- char* alloc (void)
- {
-- return (char *)malloc (8);
-+#ifdef PATH_MAX
-+ return (char *)malloc (PATH_MAX);
-+#else
-+ return (char *)malloc (4096);
-+#endif
- }
-
- static int
-diff --git a/string/tester.c b/string/tester.c
-index f7d4bac5a8..824cf315ff 100644
---- a/string/tester.c
-+++ b/string/tester.c
-@@ -34,6 +34,14 @@
- DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-truncation");
- #endif
-
-+/* When building with fortify enabled, GCC < 12 issues a warning on the
-+ fortify strncat wrapper might overflow the destination buffer (the
-+ failure is tied to -Werror).
-+ Triggered by strncat fortify wrapper when it is enabled. */
-+#if __GNUC_PREREQ (11, 0)
-+DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
-+#endif
-+
- #include <errno.h>
- #include <stdint.h>
- #include <stdio.h>
-@@ -52,9 +60,6 @@ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args");
- DIAG_IGNORE_NEEDS_COMMENT (9, "-Wrestrict");
- DIAG_IGNORE_NEEDS_COMMENT (7, "-Wstringop-overflow=");
- #endif
--#if __GNUC_PREREQ (11, 0)
--DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
--#endif
-
-
- #define STREQ(a, b) (strcmp((a), (b)) == 0)
-diff --git a/sysdeps/generic/unsecvars.h b/sysdeps/generic/unsecvars.h
-index 81397fb90b..8278c50a84 100644
---- a/sysdeps/generic/unsecvars.h
-+++ b/sysdeps/generic/unsecvars.h
-@@ -4,7 +4,6 @@
- #define UNSECURE_ENVVARS \
- "GCONV_PATH\0" \
- "GETCONF_DIR\0" \
-- "GLIBC_TUNABLES\0" \
- "HOSTALIASES\0" \
- "LD_AUDIT\0" \
- "LD_DEBUG\0" \
-diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
-index 9b48ec0ea1..b86af4aac9 100644
---- a/sysdeps/i386/i686/memcpy.S
-+++ b/sysdeps/i386/i686/memcpy.S
-@@ -27,7 +27,7 @@
- #define LEN SRC+4
-
- .text
--#if defined PIC && IS_IN (libc)
-+#if defined SHARED && IS_IN (libc)
- ENTRY_CHK (__memcpy_chk)
- movl 12(%esp), %eax
- cmpl %eax, 16(%esp)
-diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S
-index 26f8501e7d..14d9dd681a 100644
---- a/sysdeps/i386/i686/mempcpy.S
-+++ b/sysdeps/i386/i686/mempcpy.S
-@@ -27,7 +27,7 @@
- #define LEN SRC+4
-
- .text
--#if defined PIC && IS_IN (libc)
-+#if defined SHARED && IS_IN (libc)
- ENTRY_CHK (__mempcpy_chk)
- movl 12(%esp), %eax
- cmpl %eax, 16(%esp)
-diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.c b/sysdeps/i386/i686/multiarch/memcpy_chk.c
-index ec945dc91f..c3a8aeaf18 100644
---- a/sysdeps/i386/i686/multiarch/memcpy_chk.c
-+++ b/sysdeps/i386/i686/multiarch/memcpy_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memcpy_chk, __memcpy_chk,
- __hidden_ver1 (__memcpy_chk, __GI___memcpy_chk, __redirect_memcpy_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memcpy_chk);
- # endif
-+#else
-+# include <debug/memcpy_chk.c>
- #endif
-diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.c b/sysdeps/i386/i686/multiarch/memmove_chk.c
-index 55c7601d5d..070dde083a 100644
---- a/sysdeps/i386/i686/multiarch/memmove_chk.c
-+++ b/sysdeps/i386/i686/multiarch/memmove_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memmove_chk, __memmove_chk,
- __hidden_ver1 (__memmove_chk, __GI___memmove_chk, __redirect_memmove_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memmove_chk);
- # endif
-+#else
-+# include <debug/memmove_chk.c>
- #endif
-diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.c b/sysdeps/i386/i686/multiarch/mempcpy_chk.c
-index 83569cf9d9..14360f1828 100644
---- a/sysdeps/i386/i686/multiarch/mempcpy_chk.c
-+++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_mempcpy_chk, __mempcpy_chk,
- __hidden_ver1 (__mempcpy_chk, __GI___mempcpy_chk, __redirect_mempcpy_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__mempcpy_chk);
- # endif
-+#else
-+# include <debug/mempcpy_chk.c>
- #endif
-diff --git a/sysdeps/i386/i686/multiarch/memset_chk.c b/sysdeps/i386/i686/multiarch/memset_chk.c
-index 1a7503858d..8179ef7c0b 100644
---- a/sysdeps/i386/i686/multiarch/memset_chk.c
-+++ b/sysdeps/i386/i686/multiarch/memset_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memset_chk, __memset_chk,
- __hidden_ver1 (__memset_chk, __GI___memset_chk, __redirect_memset_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memset_chk);
- # endif
-+#else
-+# include <debug/memset_chk.c>
- #endif
-diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
-index 0356b622be..13082305d3 100644
---- a/sysdeps/posix/getaddrinfo.c
-+++ b/sysdeps/posix/getaddrinfo.c
-@@ -120,6 +120,7 @@ struct gaih_result
- {
- struct gaih_addrtuple *at;
- char *canon;
-+ char *h_name;
- bool free_at;
- bool got_ipv6;
- };
-@@ -165,6 +166,7 @@ gaih_result_reset (struct gaih_result *res)
- if (res->free_at)
- free (res->at);
- free (res->canon);
-+ free (res->h_name);
- memset (res, 0, sizeof (*res));
- }
-
-@@ -203,9 +205,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
- return 0;
- }
-
--/* Convert struct hostent to a list of struct gaih_addrtuple objects. h_name
-- is not copied, and the struct hostent object must not be deallocated
-- prematurely. The new addresses are appended to the tuple array in RES. */
-+/* Convert struct hostent to a list of struct gaih_addrtuple objects. The new
-+ addresses are appended to the tuple array in RES. */
- static bool
- convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
- struct hostent *h, struct gaih_result *res)
-@@ -238,6 +239,15 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
- res->at = array;
- res->free_at = true;
-
-+ /* Duplicate h_name because it may get reclaimed when the underlying storage
-+ is freed. */
-+ if (res->h_name == NULL)
-+ {
-+ res->h_name = __strdup (h->h_name);
-+ if (res->h_name == NULL)
-+ return false;
-+ }
-+
- /* Update the next pointers on reallocation. */
- for (size_t i = 0; i < old; i++)
- array[i].next = array + i + 1;
-@@ -262,7 +272,6 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
- }
- array[i].next = array + i + 1;
- }
-- array[0].name = h->h_name;
- array[count - 1].next = NULL;
-
- return true;
-@@ -324,15 +333,15 @@ gethosts (nss_gethostbyname3_r fct, int family, const char *name,
- memory allocation failure. The returned string is allocated on the
- heap; the caller has to free it. */
- static char *
--getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name)
-+getcanonname (nss_action_list nip, const char *hname, const char *name)
- {
- nss_getcanonname_r *cfct = __nss_lookup_function (nip, "getcanonname_r");
- char *s = (char *) name;
- if (cfct != NULL)
- {
- char buf[256];
-- if (DL_CALL_FCT (cfct, (at->name ?: name, buf, sizeof (buf),
-- &s, &errno, &h_errno)) != NSS_STATUS_SUCCESS)
-+ if (DL_CALL_FCT (cfct, (hname ?: name, buf, sizeof (buf), &s, &errno,
-+ &h_errno)) != NSS_STATUS_SUCCESS)
- /* If the canonical name cannot be determined, use the passed
- string. */
- s = (char *) name;
-@@ -771,7 +780,7 @@ get_nss_addresses (const char *name, const struct addrinfo *req,
- if ((req->ai_flags & AI_CANONNAME) != 0
- && res->canon == NULL)
- {
-- char *canonbuf = getcanonname (nip, res->at, name);
-+ char *canonbuf = getcanonname (nip, res->h_name, name);
- if (canonbuf == NULL)
- {
- __resolv_context_put (res_ctx);
-@@ -1187,9 +1196,7 @@ free_and_return:
- if (malloc_name)
- free ((char *) name);
- free (addrmem);
-- if (res.free_at)
-- free (res.at);
-- free (res.canon);
-+ gaih_result_reset (&res);
-
- return result;
- }
-diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
-index 2b0b8b6368..3aa6a00348 100644
---- a/sysdeps/unix/sysv/linux/check_pf.c
-+++ b/sysdeps/unix/sysv/linux/check_pf.c
-@@ -66,25 +66,10 @@ static struct cached_data *cache;
- __libc_lock_define_initialized (static, lock);
-
-
--#if IS_IN (nscd)
--static uint32_t nl_timestamp;
--
--uint32_t
--__bump_nl_timestamp (void)
--{
-- if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 == 0)
-- atomic_fetch_add_relaxed (&nl_timestamp, 1);
--
-- return nl_timestamp;
--}
--#endif
--
- static inline uint32_t
- get_nl_timestamp (void)
- {
--#if IS_IN (nscd)
-- return nl_timestamp;
--#elif defined USE_NSCD
-+#if defined USE_NSCD
- return __nscd_get_nl_timestamp ();
- #else
- return 0;
-diff --git a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-index 51d4a1b082..822c41fceb 100644
---- a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-+++ b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-@@ -52,7 +52,14 @@ xset_thread_area (struct user_desc *u_info)
- static void
- xmodify_ldt (int func, const void *ptr, unsigned long bytecount)
- {
-- TEST_VERIFY_EXIT (syscall (SYS_modify_ldt, 1, ptr, bytecount) == 0);
-+ long ret = syscall (SYS_modify_ldt, func, ptr, bytecount);
-+
-+ if (ret == -1)
-+ {
-+ if (errno == ENOSYS)
-+ FAIL_UNSUPPORTED ("modify_ldt not supported");
-+ FAIL_EXIT1 ("modify_ldt failed (errno=%d)", errno);
-+ }
- }
-
- static int
-diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
-index f7615a447e..d8a291a331 100644
---- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
-+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
-@@ -33,7 +33,7 @@
- # define __O_LARGEFILE 0200000
- #endif
-
--#if __WORDSIZE == 64
-+#if __WORDSIZE == 64 && !defined __USE_FILE_OFFSET64
- # define F_GETLK 5
- # define F_SETLK 6
- # define F_SETLKW 7
-diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
-index cd4d0351ae..5ddb35c9d9 100644
---- a/sysdeps/x86/dl-cacheinfo.h
-+++ b/sysdeps/x86/dl-cacheinfo.h
-@@ -315,40 +315,206 @@ handle_amd (int name)
- {
- unsigned int eax;
- unsigned int ebx;
-- unsigned int ecx;
-+ unsigned int ecx = 0;
- unsigned int edx;
-- unsigned int count = 0x1;
-+ unsigned int max_cpuid = 0;
-+ unsigned int fn = 0;
-
- /* No level 4 cache (yet). */
- if (name > _SC_LEVEL3_CACHE_LINESIZE)
- return 0;
-
-- if (name >= _SC_LEVEL3_CACHE_SIZE)
-- count = 0x3;
-- else if (name >= _SC_LEVEL2_CACHE_SIZE)
-- count = 0x2;
-- else if (name >= _SC_LEVEL1_DCACHE_SIZE)
-- count = 0x0;
-+ __cpuid (0x80000000, max_cpuid, ebx, ecx, edx);
-+
-+ if (max_cpuid >= 0x8000001D)
-+ /* Use __cpuid__ '0x8000_001D' to compute cache details. */
-+ {
-+ unsigned int count = 0x1;
-+
-+ if (name >= _SC_LEVEL3_CACHE_SIZE)
-+ count = 0x3;
-+ else if (name >= _SC_LEVEL2_CACHE_SIZE)
-+ count = 0x2;
-+ else if (name >= _SC_LEVEL1_DCACHE_SIZE)
-+ count = 0x0;
-+
-+ __cpuid_count (0x8000001D, count, eax, ebx, ecx, edx);
-+
-+ if (ecx != 0)
-+ {
-+ switch (name)
-+ {
-+ case _SC_LEVEL1_ICACHE_ASSOC:
-+ case _SC_LEVEL1_DCACHE_ASSOC:
-+ case _SC_LEVEL2_CACHE_ASSOC:
-+ case _SC_LEVEL3_CACHE_ASSOC:
-+ return ((ebx >> 22) & 0x3ff) + 1;
-+ case _SC_LEVEL1_ICACHE_LINESIZE:
-+ case _SC_LEVEL1_DCACHE_LINESIZE:
-+ case _SC_LEVEL2_CACHE_LINESIZE:
-+ case _SC_LEVEL3_CACHE_LINESIZE:
-+ return (ebx & 0xfff) + 1;
-+ case _SC_LEVEL1_ICACHE_SIZE:
-+ case _SC_LEVEL1_DCACHE_SIZE:
-+ case _SC_LEVEL2_CACHE_SIZE:
-+ case _SC_LEVEL3_CACHE_SIZE:
-+ return (((ebx >> 22) & 0x3ff) + 1) * ((ebx & 0xfff) + 1) * (ecx + 1);
-+ default:
-+ __builtin_unreachable ();
-+ }
-+ return -1;
-+ }
-+ }
-+
-+ /* Legacy cache computation for CPUs prior to Bulldozer family.
-+ This is also a fail-safe mechanism for some hypervisors that
-+ accidentally configure __cpuid__ '0x8000_001D' to Zero. */
-+
-+ fn = 0x80000005 + (name >= _SC_LEVEL2_CACHE_SIZE);
-+
-+ if (max_cpuid < fn)
-+ return 0;
-+
-+ __cpuid (fn, eax, ebx, ecx, edx);
-
-- __cpuid_count (0x8000001D, count, eax, ebx, ecx, edx);
-+ if (name < _SC_LEVEL1_DCACHE_SIZE)
-+ {
-+ name += _SC_LEVEL1_DCACHE_SIZE - _SC_LEVEL1_ICACHE_SIZE;
-+ ecx = edx;
-+ }
-
- switch (name)
- {
-- case _SC_LEVEL1_ICACHE_ASSOC:
-- case _SC_LEVEL1_DCACHE_ASSOC:
-- case _SC_LEVEL2_CACHE_ASSOC:
-+ case _SC_LEVEL1_DCACHE_SIZE:
-+ return (ecx >> 14) & 0x3fc00;
-+
-+ case _SC_LEVEL1_DCACHE_ASSOC:
-+ ecx >>= 16;
-+ if ((ecx & 0xff) == 0xff)
-+ {
-+ /* Fully associative. */
-+ return (ecx << 2) & 0x3fc00;
-+ }
-+ return ecx & 0xff;
-+
-+ case _SC_LEVEL1_DCACHE_LINESIZE:
-+ return ecx & 0xff;
-+
-+ case _SC_LEVEL2_CACHE_SIZE:
-+ return (ecx & 0xf000) == 0 ? 0 : (ecx >> 6) & 0x3fffc00;
-+
-+ case _SC_LEVEL2_CACHE_ASSOC:
-+ switch ((ecx >> 12) & 0xf)
-+ {
-+ case 0:
-+ case 1:
-+ case 2:
-+ case 4:
-+ return (ecx >> 12) & 0xf;
-+ case 6:
-+ return 8;
-+ case 8:
-+ return 16;
-+ case 10:
-+ return 32;
-+ case 11:
-+ return 48;
-+ case 12:
-+ return 64;
-+ case 13:
-+ return 96;
-+ case 14:
-+ return 128;
-+ case 15:
-+ return ((ecx >> 6) & 0x3fffc00) / (ecx & 0xff);
-+ default:
-+ return 0;
-+ }
-+
-+ case _SC_LEVEL2_CACHE_LINESIZE:
-+ return (ecx & 0xf000) == 0 ? 0 : ecx & 0xff;
-+
-+ case _SC_LEVEL3_CACHE_SIZE:
-+ {
-+ long int total_l3_cache = 0, l3_cache_per_thread = 0;
-+ unsigned int threads = 0;
-+ const struct cpu_features *cpu_features;
-+
-+ if ((edx & 0xf000) == 0)
-+ return 0;
-+
-+ total_l3_cache = (edx & 0x3ffc0000) << 1;
-+ cpu_features = __get_cpu_features ();
-+
-+ /* Figure out the number of logical threads that share L3. */
-+ if (max_cpuid >= 0x80000008)
-+ {
-+ /* Get width of APIC ID. */
-+ __cpuid (0x80000008, eax, ebx, ecx, edx);
-+ threads = (ecx & 0xff) + 1;
-+ }
-+
-+ if (threads == 0)
-+ {
-+ /* If APIC ID width is not available, use logical
-+ processor count. */
-+ __cpuid (0x00000001, eax, ebx, ecx, edx);
-+ if ((edx & (1 << 28)) != 0)
-+ threads = (ebx >> 16) & 0xff;
-+ }
-+
-+ /* Cap usage of highest cache level to the number of
-+ supported threads. */
-+ if (threads > 0)
-+ l3_cache_per_thread = total_l3_cache/threads;
-+
-+ /* Get shared cache per ccx for Zen architectures. */
-+ if (cpu_features->basic.family >= 0x17)
-+ {
-+ long int l3_cache_per_ccx = 0;
-+ /* Get number of threads share the L3 cache in CCX. */
-+ __cpuid_count (0x8000001D, 0x3, eax, ebx, ecx, edx);
-+ unsigned int threads_per_ccx = ((eax >> 14) & 0xfff) + 1;
-+ l3_cache_per_ccx = l3_cache_per_thread * threads_per_ccx;
-+ return l3_cache_per_ccx;
-+ }
-+ else
-+ {
-+ return l3_cache_per_thread;
-+ }
-+ }
-+
- case _SC_LEVEL3_CACHE_ASSOC:
-- return ecx ? ((ebx >> 22) & 0x3ff) + 1 : 0;
-- case _SC_LEVEL1_ICACHE_LINESIZE:
-- case _SC_LEVEL1_DCACHE_LINESIZE:
-- case _SC_LEVEL2_CACHE_LINESIZE:
-+ switch ((edx >> 12) & 0xf)
-+ {
-+ case 0:
-+ case 1:
-+ case 2:
-+ case 4:
-+ return (edx >> 12) & 0xf;
-+ case 6:
-+ return 8;
-+ case 8:
-+ return 16;
-+ case 10:
-+ return 32;
-+ case 11:
-+ return 48;
-+ case 12:
-+ return 64;
-+ case 13:
-+ return 96;
-+ case 14:
-+ return 128;
-+ case 15:
-+ return ((edx & 0x3ffc0000) << 1) / (edx & 0xff);
-+ default:
-+ return 0;
-+ }
-+
- case _SC_LEVEL3_CACHE_LINESIZE:
-- return ecx ? (ebx & 0xfff) + 1 : 0;
-- case _SC_LEVEL1_ICACHE_SIZE:
-- case _SC_LEVEL1_DCACHE_SIZE:
-- case _SC_LEVEL2_CACHE_SIZE:
-- case _SC_LEVEL3_CACHE_SIZE:
-- return ecx ? (((ebx >> 22) & 0x3ff) + 1) * ((ebx & 0xfff) + 1) * (ecx + 1): 0;
-+ return (edx & 0xf000) == 0 ? 0 : edx & 0xff;
-+
- default:
- __builtin_unreachable ();
- }
-@@ -604,11 +770,10 @@ get_common_cache_info (long int *shared_ptr, long int * shared_per_thread_ptr, u
- level. */
- threads = ((cpu_features->features[CPUID_INDEX_1].cpuid.ebx >> 16)
- & 0xff);
--
-- /* Get per-thread size of highest level cache. */
-- if (shared_per_thread > 0 && threads > 0)
-- shared_per_thread /= threads;
- }
-+ /* Get per-thread size of highest level cache. */
-+ if (shared_per_thread > 0 && threads > 0)
-+ shared_per_thread /= threads;
- }
-
- /* Account for non-inclusive L2 and L3 caches. */
-@@ -703,7 +868,6 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
- data = handle_amd (_SC_LEVEL1_DCACHE_SIZE);
- core = handle_amd (_SC_LEVEL2_CACHE_SIZE);
- shared = handle_amd (_SC_LEVEL3_CACHE_SIZE);
-- shared_per_thread = shared;
-
- level1_icache_size = handle_amd (_SC_LEVEL1_ICACHE_SIZE);
- level1_icache_linesize = handle_amd (_SC_LEVEL1_ICACHE_LINESIZE);
-@@ -716,13 +880,20 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
- level3_cache_size = shared;
- level3_cache_assoc = handle_amd (_SC_LEVEL3_CACHE_ASSOC);
- level3_cache_linesize = handle_amd (_SC_LEVEL3_CACHE_LINESIZE);
-+ level4_cache_size = handle_amd (_SC_LEVEL4_CACHE_SIZE);
-
- if (shared <= 0)
-- /* No shared L3 cache. All we have is the L2 cache. */
-- shared = core;
-+ {
-+ /* No shared L3 cache. All we have is the L2 cache. */
-+ shared = core;
-+ }
-+ else if (cpu_features->basic.family < 0x17)
-+ {
-+ /* Account for exclusive L2 and L3 caches. */
-+ shared += core;
-+ }
-
-- if (shared_per_thread <= 0)
-- shared_per_thread = shared;
-+ shared_per_thread = shared;
- }
-
- cpu_features->level1_icache_size = level1_icache_size;
-diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S
-index d98500a78a..4922cba657 100644
---- a/sysdeps/x86_64/memcpy.S
-+++ b/sysdeps/x86_64/memcpy.S
-@@ -1 +1 @@
--/* Implemented in memcpy.S. */
-+/* Implemented in memmove.S. */
-diff --git a/sysdeps/x86_64/memmove.S b/sysdeps/x86_64/memmove.S
-index f0b84e3b52..c3c08165e1 100644
---- a/sysdeps/x86_64/memmove.S
-+++ b/sysdeps/x86_64/memmove.S
-@@ -46,6 +46,9 @@ weak_alias (__mempcpy, mempcpy)
-
- #ifndef USE_MULTIARCH
- libc_hidden_builtin_def (memmove)
-+libc_hidden_builtin_def (__memmove_chk)
-+libc_hidden_builtin_def (__memcpy_chk)
-+libc_hidden_builtin_def (__mempcpy_chk)
- # if defined SHARED && IS_IN (libc)
- strong_alias (memmove, __memcpy)
- libc_hidden_ver (memmove, memcpy)
-diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
-index 7c99df36db..c6df24e8de 100644
---- a/sysdeps/x86_64/memset.S
-+++ b/sysdeps/x86_64/memset.S
-@@ -32,6 +32,7 @@
- #include "isa-default-impl.h"
-
- libc_hidden_builtin_def (memset)
-+libc_hidden_builtin_def (__memset_chk)
-
- #if IS_IN (libc)
- libc_hidden_def (__wmemset)
diff --git a/glibc-32/glibc-2.38-memalign_fix-1.patch b/glibc-32/glibc-2.38-memalign_fix-1.patch
deleted file mode 100644
index b04c21f3..00000000
--- a/glibc-32/glibc-2.38-memalign_fix-1.patch
+++ /dev/null
@@ -1,585 +0,0 @@
-Submitted By: Xi Ruoyao <xry111 at xry111.site>
-Date: 2023-08-13
-Initial Package Version: 2.38
-Upstream Status: Under review
-Origin: Upstream & Self
- - 1/3: https://sourceware.org/git/?p=glibc.git;a=patch;h=542b11058525
- - 2/3: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
- - 3/3: Trivial unused code removal
-Description: Fixes a regression causing posix_memalign()
- very slow in certain conditions to avoid
- breaking ffmpeg-based applications.
-
-From fc01478d06658ace8d57e5328c1e717275acfe84 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer(a)redhat.com>
-Date: Fri, 11 Aug 2023 11:18:17 +0200
-Subject: [PATCH 1/3] malloc: Enable merging of remainders in memalign (bug
- 30723)
-
-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(a)redhat.com>
-(cherry picked from commit 542b1105852568c3ebc712225ae78b8c8ba31a78)
----
- malloc/malloc.c | 197 +++++++++++++++++++++++++++++-------------------
- 1 file changed, 121 insertions(+), 76 deletions(-)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index e2f1a615a4..948f9759af 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -1086,6 +1086,11 @@ typedef struct malloc_chunk* mchunkptr;
-
- static void* _int_malloc(mstate, size_t);
- static void _int_free(mstate, mchunkptr, int);
-+static void _int_free_merge_chunk (mstate, mchunkptr, INTERNAL_SIZE_T);
-+static INTERNAL_SIZE_T _int_free_create_chunk (mstate,
-+ mchunkptr, INTERNAL_SIZE_T,
-+ mchunkptr, INTERNAL_SIZE_T);
-+static void _int_free_maybe_consolidate (mstate, INTERNAL_SIZE_T);
- static void* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
- INTERNAL_SIZE_T);
- static void* _int_memalign(mstate, size_t, size_t);
-@@ -4637,31 +4642,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- if (!have_lock)
- __libc_lock_lock (av->mutex);
-
-- nextchunk = chunk_at_offset(p, size);
--
-- /* Lightweight tests: check whether the block is already the
-- top block. */
-- if (__glibc_unlikely (p == av->top))
-- malloc_printerr ("double free or corruption (top)");
-- /* Or whether the next chunk is beyond the boundaries of the arena. */
-- if (__builtin_expect (contiguous (av)
-- && (char *) nextchunk
-- >= ((char *) av->top + chunksize(av->top)), 0))
-- malloc_printerr ("double free or corruption (out)");
-- /* Or whether the block is actually not marked used. */
-- if (__glibc_unlikely (!prev_inuse(nextchunk)))
-- malloc_printerr ("double free or corruption (!prev)");
--
-- nextsize = chunksize(nextchunk);
-- if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-- || __builtin_expect (nextsize >= av->system_mem, 0))
-- malloc_printerr ("free(): invalid next size (normal)");
-+ _int_free_merge_chunk (av, p, size);
-
-- free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-+ if (!have_lock)
-+ __libc_lock_unlock (av->mutex);
-+ }
-+ /*
-+ If the chunk was allocated via mmap, release via munmap().
-+ */
-+
-+ else {
-+ munmap_chunk (p);
-+ }
-+}
-+
-+/* Try to merge chunk P of SIZE bytes with its neighbors. Put the
-+ resulting chunk on the appropriate bin list. P must not be on a
-+ bin list yet, and it can be in use. */
-+static void
-+_int_free_merge_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size)
-+{
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+
-+ /* Lightweight tests: check whether the block is already the
-+ top block. */
-+ if (__glibc_unlikely (p == av->top))
-+ malloc_printerr ("double free or corruption (top)");
-+ /* Or whether the next chunk is beyond the boundaries of the arena. */
-+ if (__builtin_expect (contiguous (av)
-+ && (char *) nextchunk
-+ >= ((char *) av->top + chunksize(av->top)), 0))
-+ malloc_printerr ("double free or corruption (out)");
-+ /* Or whether the block is actually not marked used. */
-+ if (__glibc_unlikely (!prev_inuse(nextchunk)))
-+ malloc_printerr ("double free or corruption (!prev)");
-+
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-+ || __builtin_expect (nextsize >= av->system_mem, 0))
-+ malloc_printerr ("free(): invalid next size (normal)");
-+
-+ free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-
-- /* consolidate backward */
-- if (!prev_inuse(p)) {
-- prevsize = prev_size (p);
-+ /* Consolidate backward. */
-+ if (!prev_inuse(p))
-+ {
-+ INTERNAL_SIZE_T prevsize = prev_size (p);
- size += prevsize;
- p = chunk_at_offset(p, -((long) prevsize));
- if (__glibc_unlikely (chunksize(p) != prevsize))
-@@ -4669,9 +4695,25 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- unlink_chunk (av, p);
- }
-
-- if (nextchunk != av->top) {
-+ /* Write the chunk header, maybe after merging with the following chunk. */
-+ size = _int_free_create_chunk (av, p, size, nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, size);
-+}
-+
-+/* Create a chunk at P of SIZE bytes, with SIZE potentially increased
-+ to cover the immediately following chunk NEXTCHUNK of NEXTSIZE
-+ bytes (if NEXTCHUNK is unused). The chunk at P is not actually
-+ read and does not have to be initialized. After creation, it is
-+ placed on the appropriate bin list. The function returns the size
-+ of the new chunk. */
-+static INTERNAL_SIZE_T
-+_int_free_create_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size,
-+ mchunkptr nextchunk, INTERNAL_SIZE_T nextsize)
-+{
-+ if (nextchunk != av->top)
-+ {
- /* get and clear inuse bit */
-- nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
-+ bool nextinuse = inuse_bit_at_offset (nextchunk, nextsize);
-
- /* consolidate forward */
- if (!nextinuse) {
-@@ -4686,8 +4728,8 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- been given one chance to be used in malloc.
- */
-
-- bck = unsorted_chunks(av);
-- fwd = bck->fd;
-+ mchunkptr bck = unsorted_chunks (av);
-+ mchunkptr fwd = bck->fd;
- if (__glibc_unlikely (fwd->bk != bck))
- malloc_printerr ("free(): corrupted unsorted chunks");
- p->fd = fwd;
-@@ -4706,61 +4748,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- check_free_chunk(av, p);
- }
-
-- /*
-- If the chunk borders the current high end of memory,
-- consolidate into top
-- */
--
-- else {
-+ else
-+ {
-+ /* If the chunk borders the current high end of memory,
-+ consolidate into top. */
- size += nextsize;
- set_head(p, size | PREV_INUSE);
- av->top = p;
- check_chunk(av, p);
- }
-
-- /*
-- If freeing a large space, consolidate possibly-surrounding
-- chunks. Then, if the total unused topmost memory exceeds trim
-- threshold, ask malloc_trim to reduce top.
--
-- Unless max_fast is 0, we don't know if there are fastbins
-- bordering top, so we cannot tell for sure whether threshold
-- has been reached unless fastbins are consolidated. But we
-- don't want to consolidate on each free. As a compromise,
-- consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD
-- is reached.
-- */
-+ return size;
-+}
-
-- if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {
-+/* If freeing a large space, consolidate possibly-surrounding
-+ chunks. Then, if the total unused topmost memory exceeds trim
-+ threshold, ask malloc_trim to reduce top. */
-+static void
-+_int_free_maybe_consolidate (mstate av, INTERNAL_SIZE_T size)
-+{
-+ /* Unless max_fast is 0, we don't know if there are fastbins
-+ bordering top, so we cannot tell for sure whether threshold has
-+ been reached unless fastbins are consolidated. But we don't want
-+ to consolidate on each free. As a compromise, consolidation is
-+ performed if FASTBIN_CONSOLIDATION_THRESHOLD is reached. */
-+ if (size >= FASTBIN_CONSOLIDATION_THRESHOLD)
-+ {
- if (atomic_load_relaxed (&av->have_fastchunks))
- malloc_consolidate(av);
-
-- if (av == &main_arena) {
-+ if (av == &main_arena)
-+ {
- #ifndef MORECORE_CANNOT_TRIM
-- if ((unsigned long)(chunksize(av->top)) >=
-- (unsigned long)(mp_.trim_threshold))
-- systrim(mp_.top_pad, av);
-+ if (chunksize (av->top) >= mp_.trim_threshold)
-+ systrim (mp_.top_pad, av);
- #endif
-- } else {
-- /* Always try heap_trim(), even if the top chunk is not
-- large, because the corresponding heap might go away. */
-- heap_info *heap = heap_for_ptr(top(av));
-+ }
-+ else
-+ {
-+ /* Always try heap_trim, even if the top chunk is not large,
-+ because the corresponding heap might go away. */
-+ heap_info *heap = heap_for_ptr (top (av));
-
-- assert(heap->ar_ptr == av);
-- heap_trim(heap, mp_.top_pad);
-- }
-+ assert (heap->ar_ptr == av);
-+ heap_trim (heap, mp_.top_pad);
-+ }
- }
--
-- if (!have_lock)
-- __libc_lock_unlock (av->mutex);
-- }
-- /*
-- If the chunk was allocated via mmap, release via munmap().
-- */
--
-- else {
-- munmap_chunk (p);
-- }
- }
-
- /*
-@@ -5221,7 +5254,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- (av != &main_arena ? NON_MAIN_ARENA : 0));
- set_inuse_bit_at_offset (newp, newsize);
- set_head_size (p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
-- _int_free (av, p, 1);
-+ _int_free_merge_chunk (av, p, leadsize);
- p = newp;
-
- assert (newsize >= nb &&
-@@ -5232,15 +5265,27 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- if (!chunk_is_mmapped (p))
- {
- size = chunksize (p);
-- if ((unsigned long) (size) > (unsigned long) (nb + MINSIZE))
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (size > nb)
- {
- remainder_size = size - nb;
-- remainder = chunk_at_offset (p, nb);
-- set_head (remainder, remainder_size | PREV_INUSE |
-- (av != &main_arena ? NON_MAIN_ARENA : 0));
-- set_head_size (p, nb);
-- _int_free (av, remainder, 1);
-- }
-+ if (remainder_size >= MINSIZE
-+ || nextchunk == av->top
-+ || !inuse_bit_at_offset (nextchunk, nextsize))
-+ {
-+ /* We can only give back the tail if it is larger than
-+ MINSIZE, or if the following chunk is unused (top
-+ chunk or unused in-heap chunk). Otherwise we would
-+ create a chunk that is smaller than MINSIZE. */
-+ remainder = chunk_at_offset (p, nb);
-+ set_head_size (p, nb);
-+ remainder_size = _int_free_create_chunk (av, remainder,
-+ remainder_size,
-+ nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, remainder_size);
-+ }
-+ }
- }
-
- check_inuse_chunk (av, p);
---
-2.41.0
-
-From b37e836b7cc2dba672e1de1cc7e076ba1c712614 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer(a)redhat.com>
-Date: Fri, 11 Aug 2023 17:48:13 +0200
-Subject: [PATCH 2/3] malloc: Remove bin scanning from memalign (bug 30723)
-
-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.
-
-Link: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
----
- malloc/malloc.c | 127 ++--------------------------------------
- malloc/tst-memalign-2.c | 7 ++-
- 2 files changed, 10 insertions(+), 124 deletions(-)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 948f9759af..9c2cab7a59 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -5082,7 +5082,6 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- mchunkptr remainder; /* spare room at end to split off */
- unsigned long remainder_size; /* its size */
- INTERNAL_SIZE_T size;
-- mchunkptr victim;
-
- nb = checked_request2size (bytes);
- if (nb == 0)
-@@ -5101,129 +5100,13 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- we don't find anything in those bins, the common malloc code will
- scan starting at 2x. */
-
-- /* This will be set if we found a candidate chunk. */
-- victim = NULL;
-+ /* Call malloc with worst case padding to hit alignment. */
-+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
-
-- /* Fast bins are singly-linked, hard to remove a chunk from the middle
-- and unlikely to meet our alignment requirements. We have not done
-- any experimentation with searching for aligned fastbins. */
-+ if (m == 0)
-+ return 0; /* propagate failure */
-
-- if (av != NULL)
-- {
-- int first_bin_index;
-- int first_largebin_index;
-- int last_bin_index;
--
-- if (in_smallbin_range (nb))
-- first_bin_index = smallbin_index (nb);
-- else
-- first_bin_index = largebin_index (nb);
--
-- if (in_smallbin_range (nb * 2))
-- last_bin_index = smallbin_index (nb * 2);
-- else
-- last_bin_index = largebin_index (nb * 2);
--
-- first_largebin_index = largebin_index (MIN_LARGE_SIZE);
--
-- int victim_index; /* its bin index */
--
-- for (victim_index = first_bin_index;
-- victim_index < last_bin_index;
-- victim_index ++)
-- {
-- victim = NULL;
--
-- if (victim_index < first_largebin_index)
-- {
-- /* Check small bins. Small bin chunks are doubly-linked despite
-- being the same size. */
--
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
-- while (fwd != bck)
-- {
-- if (chunk_ok_for_memalign (fwd, alignment, nb) > 0)
-- {
-- victim = fwd;
--
-- /* Unlink it */
-- victim->fd->bk = victim->bk;
-- victim->bk->fd = victim->fd;
-- break;
-- }
--
-- fwd = fwd->fd;
-- }
-- }
-- else
-- {
-- /* Check large bins. */
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr best = NULL;
-- size_t best_size = 0;
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
--
-- while (fwd != bck)
-- {
-- int extra;
--
-- if (chunksize (fwd) < nb)
-- break;
-- extra = chunk_ok_for_memalign (fwd, alignment, nb);
-- if (extra > 0
-- && (extra <= best_size || best == NULL))
-- {
-- best = fwd;
-- best_size = extra;
-- }
--
-- fwd = fwd->fd;
-- }
-- victim = best;
--
-- if (victim != NULL)
-- {
-- unlink_chunk (av, victim);
-- break;
-- }
-- }
--
-- if (victim != NULL)
-- break;
-- }
-- }
--
-- /* Strategy: find a spot within that chunk that meets the alignment
-- request, and then possibly free the leading and trailing space.
-- This strategy is incredibly costly and can lead to external
-- fragmentation if header and footer chunks are unused. */
--
-- if (victim != NULL)
-- {
-- p = victim;
-- m = chunk2mem (p);
-- set_inuse (p);
-- if (av != &main_arena)
-- set_non_main_arena (p);
-- }
-- else
-- {
-- /* Call malloc with worst case padding to hit alignment. */
--
-- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
--
-- if (m == 0)
-- return 0; /* propagate failure */
--
-- p = mem2chunk (m);
-- }
-+ p = mem2chunk (m);
-
- if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
- {
-diff --git a/malloc/tst-memalign-2.c b/malloc/tst-memalign-2.c
-index f229283dbf..ecd6fa249e 100644
---- a/malloc/tst-memalign-2.c
-+++ b/malloc/tst-memalign-2.c
-@@ -86,7 +86,8 @@ do_test (void)
- TEST_VERIFY (tcache_allocs[i].ptr1 == tcache_allocs[i].ptr2);
- }
-
-- /* Test for non-head tcache hits. */
-+ /* Test for non-head tcache hits. This exercises the memalign
-+ scanning code to find matching allocations. */
- for (i = 0; i < array_length (ptr); ++ i)
- {
- if (i == 4)
-@@ -113,7 +114,9 @@ do_test (void)
- free (p);
- TEST_VERIFY (count > 0);
-
-- /* Large bins test. */
-+ /* Large bins test. This verifies that the over-allocated parts
-+ that memalign releases for future allocations can be reused by
-+ memalign itself at least in some cases. */
-
- for (i = 0; i < LN; ++ i)
- {
---
-2.41.0
-
-From 26973f7b09c33e67f6bcbc79371796c8dd334528 Mon Sep 17 00:00:00 2001
-From: Xi Ruoyao <xry111(a)xry111.site>
-Date: Mon, 14 Aug 2023 11:05:18 +0800
-Subject: [PATCH 3/3] malloc: Remove unused functions and variables
-
-Remove unused chunk_ok_for_memalign function and unused local variables
-in _int_free.
-
-Signed-off-by: Xi Ruoyao <xry111(a)xry111.site>
----
- malloc/malloc.c | 42 ------------------------------------------
- 1 file changed, 42 deletions(-)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 9c2cab7a59..d0bbbf3710 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -4488,12 +4488,6 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- {
- INTERNAL_SIZE_T size; /* its size */
- mfastbinptr *fb; /* associated fastbin */
-- mchunkptr nextchunk; /* next contiguous chunk */
-- INTERNAL_SIZE_T nextsize; /* its size */
-- int nextinuse; /* true if nextchunk is used */
-- INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr fwd; /* misc temp for linking */
-
- size = chunksize (p);
-
-@@ -5032,42 +5026,6 @@ _int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
- ------------------------------ memalign ------------------------------
- */
-
--/* Returns 0 if the chunk is not and does not contain the requested
-- aligned sub-chunk, else returns the amount of "waste" from
-- trimming. NB is the *chunk* byte size, not the user byte
-- size. */
--static size_t
--chunk_ok_for_memalign (mchunkptr p, size_t alignment, size_t nb)
--{
-- void *m = chunk2mem (p);
-- INTERNAL_SIZE_T size = chunksize (p);
-- void *aligned_m = m;
--
-- if (__glibc_unlikely (misaligned_chunk (p)))
-- malloc_printerr ("_int_memalign(): unaligned chunk detected");
--
-- aligned_m = PTR_ALIGN_UP (m, alignment);
--
-- INTERNAL_SIZE_T front_extra = (intptr_t) aligned_m - (intptr_t) m;
--
-- /* We can't trim off the front as it's too small. */
-- if (front_extra > 0 && front_extra < MINSIZE)
-- return 0;
--
-- /* If it's a perfect fit, it's an exception to the return value rule
-- (we would return zero waste, which looks like "not usable"), so
-- handle it here by returning a small non-zero value instead. */
-- if (size == nb && front_extra == 0)
-- return 1;
--
-- /* If the block we need fits in the chunk, calculate total waste. */
-- if (size > nb + front_extra)
-- return size - nb;
--
-- /* Can't use this chunk. */
-- return 0;
--}
--
- /* BYTES is user requested bytes, not requested chunksize bytes. */
- static void *
- _int_memalign (mstate av, size_t alignment, size_t bytes)
---
-2.41.0
-
diff --git a/glibc-32/glibc-2.38-fhs-1.patch b/glibc-32/glibc-2.39-fhs-1.patch
similarity index 64%
rename from glibc-32/glibc-2.38-fhs-1.patch
rename to glibc-32/glibc-2.39-fhs-1.patch
index 4ac8d106..6e48c974 100644
--- a/glibc-32/glibc-2.38-fhs-1.patch
+++ b/glibc-32/glibc-2.39-fhs-1.patch
@@ -7,9 +7,10 @@ Description: This patch removes references to /var/db directory whic
of FHS and replaces them with more suitable directories in /var
hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
---- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100
-+++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100
-@@ -250,7 +250,7 @@
+diff -Nru glibc-2.39.orig/Makeconfig glibc-2.39/Makeconfig
+--- glibc-2.39.orig/Makeconfig 2024-02-11 09:36:11.769783145 +0000
++++ glibc-2.39/Makeconfig 2024-02-11 09:36:55.883504464 +0000
+@@ -262,7 +262,7 @@
# Directory for the database files and Makefile for nss_db.
ifndef vardbdir
@@ -18,9 +19,10 @@ Description: This patch removes references to /var/db directory whic
endif
inst_vardbdir = $(install_root)$(vardbdir)
---- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100
-+++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100
-@@ -112,11 +112,11 @@
+diff -Nru glibc-2.39.orig/nscd/nscd.h glibc-2.39/nscd/nscd.h
+--- glibc-2.39.orig/nscd/nscd.h 2024-02-11 09:36:11.939784638 +0000
++++ glibc-2.39/nscd/nscd.h 2024-02-11 09:36:55.883504464 +0000
+@@ -160,11 +160,11 @@
/* Paths of the file for the persistent storage. */
@@ -37,9 +39,10 @@ Description: This patch removes references to /var/db directory whic
/* Path used when not using persistent storage. */
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
---- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100
-+++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100
-@@ -22,7 +22,7 @@
+diff -Nru glibc-2.39.orig/nss/db-Makefile glibc-2.39/nss/db-Makefile
+--- glibc-2.39.orig/nss/db-Makefile 2024-02-11 09:36:11.939784638 +0000
++++ glibc-2.39/nss/db-Makefile 2024-02-11 09:36:55.883504464 +0000
+@@ -21,7 +21,7 @@
/etc/rpc /etc/services /etc/shadow /etc/gshadow \
/etc/netgroup)
@@ -48,8 +51,9 @@ Description: This patch removes references to /var/db directory whic
AWK = awk
MAKEDB = makedb --quiet
---- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100
-+++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100
+diff -Nru glibc-2.39.orig/sysdeps/generic/paths.h glibc-2.39/sysdeps/generic/paths.h
+--- glibc-2.39.orig/sysdeps/generic/paths.h 2024-02-11 09:36:11.993118441 +0000
++++ glibc-2.39/sysdeps/generic/paths.h 2024-02-11 09:36:55.883504464 +0000
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
@@ -59,8 +63,9 @@ Description: This patch removes references to /var/db directory whic
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
---- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100
-+++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100
+diff -Nru glibc-2.39.orig/sysdeps/unix/sysv/linux/paths.h glibc-2.39/sysdeps/unix/sysv/linux/paths.h
+--- glibc-2.39.orig/sysdeps/unix/sysv/linux/paths.h 2024-02-11 09:36:12.119786221 +0000
++++ glibc-2.39/sysdeps/unix/sysv/linux/paths.h 2024-02-11 09:36:55.886837827 +0000
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
1
0
commit 6e87bd80b61d35b85540cced096bbbe4bdc4839f
Author: Juergen Daubert <jue(a)crux.nu>
Date: Sun Feb 11 13:13:10 2024 +0100
glibc: updated to version 2.39
diff --git a/glibc/.footprint b/glibc/.footprint
index cd7e9832..a777096f 100644
--- a/glibc/.footprint
+++ b/glibc/.footprint
@@ -240,6 +240,7 @@ drwxr-xr-x root/root usr/include/bits/
-rw-r--r-- root/root usr/include/bits/netdb.h
-rw-r--r-- root/root usr/include/bits/param.h
drwxr-xr-x root/root usr/include/bits/platform/
+-rw-r--r-- root/root usr/include/bits/platform/features.h
-rw-r--r-- root/root usr/include/bits/platform/x86.h
-rw-r--r-- root/root usr/include/bits/poll.h
-rw-r--r-- root/root usr/include/bits/poll2.h
@@ -286,6 +287,7 @@ drwxr-xr-x root/root usr/include/bits/platform/
-rw-r--r-- root/root usr/include/bits/socket.h
-rw-r--r-- root/root usr/include/bits/socket2.h
-rw-r--r-- root/root usr/include/bits/socket_type.h
+-rw-r--r-- root/root usr/include/bits/spawn_ext.h
-rw-r--r-- root/root usr/include/bits/ss_flags.h
-rw-r--r-- root/root usr/include/bits/stab.def
-rw-r--r-- root/root usr/include/bits/stat.h
@@ -294,6 +296,7 @@ drwxr-xr-x root/root usr/include/bits/platform/
-rw-r--r-- root/root usr/include/bits/statx-generic.h
-rw-r--r-- root/root usr/include/bits/statx.h
-rw-r--r-- root/root usr/include/bits/stdint-intn.h
+-rw-r--r-- root/root usr/include/bits/stdint-least.h
-rw-r--r-- root/root usr/include/bits/stdint-uintn.h
-rw-r--r-- root/root usr/include/bits/stdio-ldbl.h
-rw-r--r-- root/root usr/include/bits/stdio.h
@@ -416,24 +419,21 @@ drwxr-xr-x root/root usr/include/drm/
-rw-r--r-- root/root usr/include/drm/drm_sarea.h
-rw-r--r-- root/root usr/include/drm/etnaviv_drm.h
-rw-r--r-- root/root usr/include/drm/exynos_drm.h
--rw-r--r-- root/root usr/include/drm/i810_drm.h
+-rw-r--r-- root/root usr/include/drm/habanalabs_accel.h
-rw-r--r-- root/root usr/include/drm/i915_drm.h
+-rw-r--r-- root/root usr/include/drm/ivpu_accel.h
-rw-r--r-- root/root usr/include/drm/lima_drm.h
--rw-r--r-- root/root usr/include/drm/mga_drm.h
-rw-r--r-- root/root usr/include/drm/msm_drm.h
-rw-r--r-- root/root usr/include/drm/nouveau_drm.h
-rw-r--r-- root/root usr/include/drm/omap_drm.h
-rw-r--r-- root/root usr/include/drm/panfrost_drm.h
+-rw-r--r-- root/root usr/include/drm/qaic_accel.h
-rw-r--r-- root/root usr/include/drm/qxl_drm.h
--rw-r--r-- root/root usr/include/drm/r128_drm.h
-rw-r--r-- root/root usr/include/drm/radeon_drm.h
--rw-r--r-- root/root usr/include/drm/savage_drm.h
--rw-r--r-- root/root usr/include/drm/sis_drm.h
-rw-r--r-- root/root usr/include/drm/tegra_drm.h
-rw-r--r-- root/root usr/include/drm/v3d_drm.h
-rw-r--r-- root/root usr/include/drm/vc4_drm.h
-rw-r--r-- root/root usr/include/drm/vgem_drm.h
--rw-r--r-- root/root usr/include/drm/via_drm.h
-rw-r--r-- root/root usr/include/drm/virtgpu_drm.h
-rw-r--r-- root/root usr/include/drm/vmwgfx_drm.h
-rw-r--r-- root/root usr/include/elf.h
@@ -496,6 +496,7 @@ drwxr-xr-x root/root usr/include/linux/android/
-rw-r--r-- root/root usr/include/linux/arm_sdei.h
-rw-r--r-- root/root usr/include/linux/aspeed-lpc-ctrl.h
-rw-r--r-- root/root usr/include/linux/aspeed-p2a-ctrl.h
+-rw-r--r-- root/root usr/include/linux/aspeed-video.h
-rw-r--r-- root/root usr/include/linux/atalk.h
-rw-r--r-- root/root usr/include/linux/atm.h
-rw-r--r-- root/root usr/include/linux/atm_eni.h
@@ -572,7 +573,6 @@ drwxr-xr-x root/root usr/include/linux/cifs/
-rw-r--r-- root/root usr/include/linux/cifs/cifs_mount.h
-rw-r--r-- root/root usr/include/linux/cifs/cifs_netlink.h
-rw-r--r-- root/root usr/include/linux/close_range.h
--rw-r--r-- root/root usr/include/linux/cm4000_cs.h
-rw-r--r-- root/root usr/include/linux/cn_proc.h
-rw-r--r-- root/root usr/include/linux/coda.h
-rw-r--r-- root/root usr/include/linux/coff.h
@@ -592,7 +592,6 @@ drwxr-xr-x root/root usr/include/linux/cifs/
-rw-r--r-- root/root usr/include/linux/devlink.h
-rw-r--r-- root/root usr/include/linux/dlm.h
-rw-r--r-- root/root usr/include/linux/dlm_device.h
--rw-r--r-- root/root usr/include/linux/dlm_netlink.h
-rw-r--r-- root/root usr/include/linux/dlm_plock.h
-rw-r--r-- root/root usr/include/linux/dlmconstants.h
-rw-r--r-- root/root usr/include/linux/dm-ioctl.h
@@ -621,7 +620,9 @@ drwxr-xr-x root/root usr/include/linux/dvb/
-rw-r--r-- root/root usr/include/linux/erspan.h
-rw-r--r-- root/root usr/include/linux/ethtool.h
-rw-r--r-- root/root usr/include/linux/ethtool_netlink.h
+-rw-r--r-- root/root usr/include/linux/eventfd.h
-rw-r--r-- root/root usr/include/linux/eventpoll.h
+-rw-r--r-- root/root usr/include/linux/ext4.h
-rw-r--r-- root/root usr/include/linux/f2fs.h
-rw-r--r-- root/root usr/include/linux/fadvise.h
-rw-r--r-- root/root usr/include/linux/falloc.h
@@ -655,6 +656,7 @@ drwxr-xr-x root/root usr/include/linux/genwqe/
-rw-r--r-- root/root usr/include/linux/gpio.h
-rw-r--r-- root/root usr/include/linux/gsmmux.h
-rw-r--r-- root/root usr/include/linux/gtp.h
+-rw-r--r-- root/root usr/include/linux/handshake.h
-rw-r--r-- root/root usr/include/linux/hash_info.h
-rw-r--r-- root/root usr/include/linux/hdlc.h
drwxr-xr-x root/root usr/include/linux/hdlc/
@@ -729,6 +731,7 @@ drwxr-xr-x root/root usr/include/linux/iio/
-rw-r--r-- root/root usr/include/linux/ioam6_iptunnel.h
-rw-r--r-- root/root usr/include/linux/ioctl.h
-rw-r--r-- root/root usr/include/linux/iommu.h
+-rw-r--r-- root/root usr/include/linux/iommufd.h
-rw-r--r-- root/root usr/include/linux/ioprio.h
-rw-r--r-- root/root usr/include/linux/ip.h
-rw-r--r-- root/root usr/include/linux/ip6_tunnel.h
@@ -737,6 +740,7 @@ drwxr-xr-x root/root usr/include/linux/iio/
-rw-r--r-- root/root usr/include/linux/ipmi.h
-rw-r--r-- root/root usr/include/linux/ipmi_bmc.h
-rw-r--r-- root/root usr/include/linux/ipmi_msgdefs.h
+-rw-r--r-- root/root usr/include/linux/ipmi_ssif_bmc.h
-rw-r--r-- root/root usr/include/linux/ipsec.h
-rw-r--r-- root/root usr/include/linux/ipv6.h
-rw-r--r-- root/root usr/include/linux/ipv6_route.h
@@ -785,10 +789,10 @@ drwxr-xr-x root/root usr/include/linux/isdn/
-rw-r--r-- root/root usr/include/linux/media-bus-format.h
-rw-r--r-- root/root usr/include/linux/media.h
-rw-r--r-- root/root usr/include/linux/mei.h
+-rw-r--r-- root/root usr/include/linux/mei_uuid.h
-rw-r--r-- root/root usr/include/linux/membarrier.h
-rw-r--r-- root/root usr/include/linux/memfd.h
-rw-r--r-- root/root usr/include/linux/mempolicy.h
--rw-r--r-- root/root usr/include/linux/meye.h
-rw-r--r-- root/root usr/include/linux/mii.h
-rw-r--r-- root/root usr/include/linux/minix_fs.h
drwxr-xr-x root/root usr/include/linux/misc/
@@ -819,6 +823,7 @@ drwxr-xr-x root/root usr/include/linux/mmc/
-rw-r--r-- root/root usr/include/linux/net_namespace.h
-rw-r--r-- root/root usr/include/linux/net_tstamp.h
-rw-r--r-- root/root usr/include/linux/netconf.h
+-rw-r--r-- root/root usr/include/linux/netdev.h
-rw-r--r-- root/root usr/include/linux/netdevice.h
-rw-r--r-- root/root usr/include/linux/netfilter.h
drwxr-xr-x root/root usr/include/linux/netfilter/
@@ -1031,6 +1036,7 @@ drwxr-xr-x root/root usr/include/linux/nfsd/
-rw-r--r-- root/root usr/include/linux/prctl.h
-rw-r--r-- root/root usr/include/linux/psample.h
-rw-r--r-- root/root usr/include/linux/psci.h
+-rw-r--r-- root/root usr/include/linux/psp-dbc.h
-rw-r--r-- root/root usr/include/linux/psp-sev.h
-rw-r--r-- root/root usr/include/linux/ptp_clock.h
-rw-r--r-- root/root usr/include/linux/ptrace.h
@@ -1150,6 +1156,7 @@ drwxr-xr-x root/root usr/include/linux/tc_ematch/
-rw-r--r-- root/root usr/include/linux/tc_ematch/tc_em_text.h
-rw-r--r-- root/root usr/include/linux/tcp.h
-rw-r--r-- root/root usr/include/linux/tcp_metrics.h
+-rw-r--r-- root/root usr/include/linux/tdx-guest.h
-rw-r--r-- root/root usr/include/linux/tee.h
-rw-r--r-- root/root usr/include/linux/termios.h
-rw-r--r-- root/root usr/include/linux/thermal.h
@@ -1165,6 +1172,7 @@ drwxr-xr-x root/root usr/include/linux/tc_ematch/
-rw-r--r-- root/root usr/include/linux/tipc_sockets_diag.h
-rw-r--r-- root/root usr/include/linux/tls.h
-rw-r--r-- root/root usr/include/linux/toshiba.h
+-rw-r--r-- root/root usr/include/linux/tps6594_pfsm.h
-rw-r--r-- root/root usr/include/linux/tty.h
-rw-r--r-- root/root usr/include/linux/tty_flags.h
-rw-r--r-- root/root usr/include/linux/types.h
@@ -1198,6 +1206,7 @@ drwxr-xr-x root/root usr/include/linux/usb/
-rw-r--r-- root/root usr/include/linux/usb/video.h
-rw-r--r-- root/root usr/include/linux/usbdevice_fs.h
-rw-r--r-- root/root usr/include/linux/usbip.h
+-rw-r--r-- root/root usr/include/linux/user_events.h
-rw-r--r-- root/root usr/include/linux/userfaultfd.h
-rw-r--r-- root/root usr/include/linux/userio.h
-rw-r--r-- root/root usr/include/linux/utime.h
@@ -1277,7 +1286,6 @@ drwxr-xr-x root/root usr/include/linux/usb/
drwxr-xr-x root/root usr/include/misc/
-rw-r--r-- root/root usr/include/misc/cxl.h
-rw-r--r-- root/root usr/include/misc/fastrpc.h
--rw-r--r-- root/root usr/include/misc/habanalabs.h
-rw-r--r-- root/root usr/include/misc/ocxl.h
-rw-r--r-- root/root usr/include/misc/pvpanic.h
drwxr-xr-x root/root usr/include/misc/uacce/
@@ -1369,6 +1377,7 @@ drwxr-xr-x root/root usr/include/rdma/hfi/
-rw-r--r-- root/root usr/include/rdma/ib_user_sa.h
-rw-r--r-- root/root usr/include/rdma/ib_user_verbs.h
-rw-r--r-- root/root usr/include/rdma/irdma-abi.h
+-rw-r--r-- root/root usr/include/rdma/mana-abi.h
-rw-r--r-- root/root usr/include/rdma/mlx4-abi.h
-rw-r--r-- root/root usr/include/rdma/mlx5-abi.h
-rw-r--r-- root/root usr/include/rdma/mlx5_user_ioctl_cmds.h
@@ -1440,6 +1449,7 @@ drwxr-xr-x root/root usr/include/sound/sof/
-rw-r--r-- root/root usr/include/sound/usb_stream.h
-rw-r--r-- root/root usr/include/spawn.h
-rw-r--r-- root/root usr/include/stab.h
+-rw-r--r-- root/root usr/include/stdbit.h
-rw-r--r-- root/root usr/include/stdc-predef.h
-rw-r--r-- root/root usr/include/stdint.h
-rw-r--r-- root/root usr/include/stdio.h
@@ -1846,7 +1856,7 @@ lrwxrwxrwx root/root usr/lib/libc_malloc_debug.so -> ../../lib/libc_malloc_debug
-rw-r--r-- root/root usr/lib/libc_nonshared.a
-rw-r--r-- root/root usr/lib/libdl.a
-rw-r--r-- root/root usr/lib/libg.a
--rw-r--r-- root/root usr/lib/libm-2.38.a
+-rw-r--r-- root/root usr/lib/libm-2.39.a
-rw-r--r-- root/root usr/lib/libm.a
-rw-r--r-- root/root usr/lib/libm.so
-rw-r--r-- root/root usr/lib/libmcheck.a
@@ -2122,7 +2132,6 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/POSIX
-rw-r--r-- root/root usr/share/i18n/locales/aa_DJ
-rw-r--r-- root/root usr/share/i18n/locales/aa_ER
--rw-r--r-- root/root usr/share/i18n/locales/aa_ER@saaho
-rw-r--r-- root/root usr/share/i18n/locales/aa_ET
-rw-r--r-- root/root usr/share/i18n/locales/ab_GE
-rw-r--r-- root/root usr/share/i18n/locales/af_ZA
@@ -2185,6 +2194,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/ckb_IQ
-rw-r--r-- root/root usr/share/i18n/locales/cmn_TW
-rw-r--r-- root/root usr/share/i18n/locales/cns11643_stroke
+-rw-r--r-- root/root usr/share/i18n/locales/crh_RU
-rw-r--r-- root/root usr/share/i18n/locales/crh_UA
-rw-r--r-- root/root usr/share/i18n/locales/cs_CZ
-rw-r--r-- root/root usr/share/i18n/locales/csb_PL
@@ -2274,6 +2284,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/fy_NL
-rw-r--r-- root/root usr/share/i18n/locales/ga_IE
-rw-r--r-- root/root usr/share/i18n/locales/ga_IE@euro
+-rw-r--r-- root/root usr/share/i18n/locales/gbm_IN
-rw-r--r-- root/root usr/share/i18n/locales/gd_GB
-rw-r--r-- root/root usr/share/i18n/locales/gez_ER
-rw-r--r-- root/root usr/share/i18n/locales/gez_ER@abegede
@@ -2320,6 +2331,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/ks_IN
-rw-r--r-- root/root usr/share/i18n/locales/ks_IN@devanagari
-rw-r--r-- root/root usr/share/i18n/locales/ku_TR
+-rw-r--r-- root/root usr/share/i18n/locales/kv_RU
-rw-r--r-- root/root usr/share/i18n/locales/kw_GB
-rw-r--r-- root/root usr/share/i18n/locales/ky_KG
-rw-r--r-- root/root usr/share/i18n/locales/lb_LU
@@ -2413,7 +2425,9 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/sr_RS
-rw-r--r-- root/root usr/share/i18n/locales/sr_RS@latin
-rw-r--r-- root/root usr/share/i18n/locales/ss_ZA
+-rw-r--r-- root/root usr/share/i18n/locales/ssy_ER
-rw-r--r-- root/root usr/share/i18n/locales/st_ZA
+-rw-r--r-- root/root usr/share/i18n/locales/su_ID
-rw-r--r-- root/root usr/share/i18n/locales/sv_FI
-rw-r--r-- root/root usr/share/i18n/locales/sv_FI@euro
-rw-r--r-- root/root usr/share/i18n/locales/sv_SE
@@ -2435,6 +2449,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/tl_PH
-rw-r--r-- root/root usr/share/i18n/locales/tn_ZA
-rw-r--r-- root/root usr/share/i18n/locales/to_TO
+-rw-r--r-- root/root usr/share/i18n/locales/tok
-rw-r--r-- root/root usr/share/i18n/locales/tpi_PG
-rw-r--r-- root/root usr/share/i18n/locales/tr_CY
-rw-r--r-- root/root usr/share/i18n/locales/tr_TR
@@ -2443,6 +2458,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/translit_cjk_variants
-rw-r--r-- root/root usr/share/i18n/locales/translit_combining
-rw-r--r-- root/root usr/share/i18n/locales/translit_compat
+-rw-r--r-- root/root usr/share/i18n/locales/translit_emojis
-rw-r--r-- root/root usr/share/i18n/locales/translit_font
-rw-r--r-- root/root usr/share/i18n/locales/translit_fraction
-rw-r--r-- root/root usr/share/i18n/locales/translit_hangul
@@ -2472,6 +2488,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/yo_NG
-rw-r--r-- root/root usr/share/i18n/locales/yue_HK
-rw-r--r-- root/root usr/share/i18n/locales/yuw_PG
+-rw-r--r-- root/root usr/share/i18n/locales/zgh_MA
-rw-r--r-- root/root usr/share/i18n/locales/zh_CN
-rw-r--r-- root/root usr/share/i18n/locales/zh_HK
-rw-r--r-- root/root usr/share/i18n/locales/zh_SG
diff --git a/glibc/.signature b/glibc/.signature
index 71747736..ee76df88 100644
--- a/glibc/.signature
+++ b/glibc/.signature
@@ -1,11 +1,10 @@
untrusted comment: verify with /etc/ports/core.pub
-RWRJc1FUaeVeqmr+T7gyU7xjK/x66w91Q3sWOM0YBdvWyBU+b5KQ7gY1AP963ugeT9bRN7yP3IuWzk+HBBpJedWUWG0XZFeoDg4=
-SHA256 (Pkgfile) = f4672b4be5b2588cc532d557732e5fc2e27975c514d4c12211d29c53710861c7
-SHA256 (.footprint) = 8ca795cbdb4d5aa0cd5d4ecff33f605b6fdd41455252a0825dadc36daa1e9597
-SHA256 (glibc-2.38.tar.xz) = fb82998998b2b29965467bc1b69d152e9c307d2cf301c9eafb4555b770ef3fd2
-SHA256 (linux-6.1.46.tar.xz) = f5f67bcfccd47f8d9db2d5ba24e33af7778f40a777577d1fba424f4a1712a296
-SHA256 (glibc-2.38-1.patch) = 65627cd20480dada7311f68d11dcfb4167fbea9b4c1829f2c694a4d794f14c9a
-SHA256 (glibc-2.38-fhs-1.patch) = 643552db030e2f2d7ffde4f558e0f5f83d3fabf34a2e0e56ebdb49750ac27b0d
+RWRJc1FUaeVeqmXIr2yabyPq13IbmM7woeIPZCtZNcjejGfFJ2LZUjDmQw285vNHlTM6YgfIcs9vsAUs/K6xpWivXc/PYstGUQg=
+SHA256 (Pkgfile) = dfc371a23dab3f83b5afa2a4b1e94b97cbf7ea95231ea442d8f393f1c66dbda1
+SHA256 (.footprint) = 0a37ea4c1e48f2d36e61e7ce20c9611e95c173c2b79c5d82cd86c463cc300e01
+SHA256 (glibc-2.39.tar.xz) = f77bd47cf8170c57365ae7bf86696c118adb3b120d3259c64c502d3dc1e2d926
+SHA256 (linux-6.6.16.tar.xz) = b21d5795a3bead4f112916423222faa8a0f519e4201df343e3eb88dc9e4aaa30
+SHA256 (glibc-2.39-fhs-1.patch) = cbcece806ae8469fa3693fd181290b57045722b304cd2dd2a1cf3e160554f203
SHA256 (hosts) = 5c02b256c105f1d4a12fb738d71c1bab9eb126533074d7a0c8a14b92670c9431
SHA256 (resolv.conf) = 72ccb58768a72a771ec37142bc361a18478a07ec9de6e925a20760794389bf51
SHA256 (nsswitch.conf) = 859b8984e5e90aff3cce8f9779996ae4033b280d2122840e9411e2f44a1c2e61
diff --git a/glibc/Pkgfile b/glibc/Pkgfile
index 1e24b218..1dfc5105 100644
--- a/glibc/Pkgfile
+++ b/glibc/Pkgfile
@@ -3,14 +3,14 @@
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=glibc
-version=2.38
-release=2
-_kernel_version=6.1.46
+version=2.39
+release=1
+_kernel_version=6.6.16
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
https://www.kernel.org/pub/linux/kernel/v6.x/linux-$_kernel_version.tar.xz
- glibc-$version-1.patch
- glibc-2.38-fhs-1.patch
+ #glibc-$version-1.patch
+ glibc-2.39-fhs-1.patch
hosts resolv.conf nsswitch.conf host.conf ld.so.conf
locale-gen locale.gen.in)
@@ -20,8 +20,8 @@ build() {
make -C $SRC/linux-$_kernel_version INSTALL_HDR_PATH=$PKG/usr headers_install
chown root:root $PKG/usr
- patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/$name-$version-1.patch
- patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/glibc-2.38-fhs-1.patch
+ #patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/$name-$version-1.patch
+ patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/glibc-2.39-fhs-1.patch
mkdir $SRC/build
cd $SRC/build
diff --git a/glibc/glibc-2.38-1.patch b/glibc/glibc-2.38-1.patch
deleted file mode 100644
index bfb58feb..00000000
--- a/glibc/glibc-2.38-1.patch
+++ /dev/null
@@ -1,1912 +0,0 @@
-diff --git a/NEWS b/NEWS
-index 872bc8907b..f117874e34 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,38 @@ See the end for copying conditions.
-
- Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
- using `glibc' in the "product" field.
-+
-+Version 2.38.1
-+
-+Security related changes:
-+
-+ CVE-2023-4527: If the system is configured in no-aaaa mode via
-+ /etc/resolv.conf, getaddrinfo is called for the AF_UNSPEC address
-+ family, and a DNS response is received over TCP that is larger than
-+ 2048 bytes, getaddrinfo may potentially disclose stack contents via
-+ the returned address data, or crash.
-+
-+ CVE-2023-4806: When an NSS plugin only implements the
-+ _gethostbyname2_r and _getcanonname_r callbacks, getaddrinfo could use
-+ memory that was freed during buffer resizing, potentially causing a
-+ crash or read or write to arbitrary memory.
-+
-+ CVE-2023-5156: The fix for CVE-2023-4806 introduced a memory leak when
-+ an application calls getaddrinfo for AF_INET6 with AI_CANONNAME,
-+ AI_ALL and AI_V4MAPPED flags set.
-+
-+ CVE-2023-4911: If a tunable of the form NAME=NAME=VAL is passed in the
-+ environment of a setuid program and NAME is valid, it may result in a
-+ buffer overflow, which could be exploited to achieve escalated
-+ privileges. This flaw was introduced in glibc 2.34.
-+
-+The following bugs are resolved with this release:
-+
-+ [30723] posix_memalign repeatedly scans long bin lists
-+ [30804] F_GETLK, F_SETLK, and F_SETLKW value change for powerpc64 with
-+ -D_FILE_OFFSET_BITS=64
-+ [30842] Stack read overflow in getaddrinfo in no-aaaa mode (CVE-2023-4527)
-+
-
- Version 2.38
-
-diff --git a/elf/dl-init.c b/elf/dl-init.c
-index 5b0732590f..ba4d2fdc85 100644
---- a/elf/dl-init.c
-+++ b/elf/dl-init.c
-@@ -25,10 +25,14 @@
- static void
- call_init (struct link_map *l, int argc, char **argv, char **env)
- {
-+ /* Do not run constructors for proxy objects. */
-+ if (l != l->l_real)
-+ return;
-+
- /* If the object has not been relocated, this is a bug. The
- function pointers are invalid in this case. (Executables do not
-- need relocation, and neither do proxy objects.) */
-- assert (l->l_real->l_relocated || l->l_real->l_type == lt_executable);
-+ need relocation.) */
-+ assert (l->l_relocated || l->l_type == lt_executable);
-
- if (l->l_init_called)
- /* This object is all done. */
-diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
-index 62b7332d95..cae67efa0a 100644
---- a/elf/dl-tunables.c
-+++ b/elf/dl-tunables.c
-@@ -180,11 +180,7 @@ parse_tunables (char *tunestr, char *valstring)
- /* If we reach the end of the string before getting a valid name-value
- pair, bail out. */
- if (p[len] == '\0')
-- {
-- if (__libc_enable_secure)
-- tunestr[off] = '\0';
-- return;
-- }
-+ break;
-
- /* We did not find a valid name-value pair before encountering the
- colon. */
-@@ -244,9 +240,16 @@ parse_tunables (char *tunestr, char *valstring)
- }
- }
-
-- if (p[len] != '\0')
-- p += len + 1;
-+ /* We reached the end while processing the tunable string. */
-+ if (p[len] == '\0')
-+ break;
-+
-+ p += len + 1;
- }
-+
-+ /* Terminate tunestr before we leave. */
-+ if (__libc_enable_secure)
-+ tunestr[off] = '\0';
- }
-
- /* Enable the glibc.malloc.check tunable in SETUID/SETGID programs only when
-diff --git a/elf/tst-env-setuid-tunables.c b/elf/tst-env-setuid-tunables.c
-index 7dfb0e073a..f0b92c97e7 100644
---- a/elf/tst-env-setuid-tunables.c
-+++ b/elf/tst-env-setuid-tunables.c
-@@ -50,6 +50,8 @@ const char *teststrings[] =
- "glibc.malloc.perturb=0x800:not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096",
- "glibc.not_valid.check=2:glibc.malloc.mmap_threshold=4096",
- "not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096",
-+ "glibc.malloc.mmap_threshold=glibc.malloc.mmap_threshold=4096",
-+ "glibc.malloc.check=2",
- "glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096:glibc.malloc.check=2",
- "glibc.malloc.check=4:glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096",
- ":glibc.malloc.garbage=2:glibc.malloc.check=1",
-@@ -68,6 +70,8 @@ const char *resultstrings[] =
- "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096",
- "glibc.malloc.mmap_threshold=4096",
- "glibc.malloc.mmap_threshold=4096",
-+ "glibc.malloc.mmap_threshold=glibc.malloc.mmap_threshold=4096",
-+ "",
- "",
- "",
- "",
-@@ -81,11 +85,18 @@ test_child (int off)
- {
- const char *val = getenv ("GLIBC_TUNABLES");
-
-+ printf (" [%d] GLIBC_TUNABLES is %s\n", off, val);
-+ fflush (stdout);
- if (val != NULL && strcmp (val, resultstrings[off]) == 0)
- return 0;
-
- if (val != NULL)
-- printf ("[%d] Unexpected GLIBC_TUNABLES VALUE %s\n", off, val);
-+ printf (" [%d] Unexpected GLIBC_TUNABLES VALUE %s, expected %s\n",
-+ off, val, resultstrings[off]);
-+ else
-+ printf (" [%d] GLIBC_TUNABLES environment variable absent\n", off);
-+
-+ fflush (stdout);
-
- return 1;
- }
-@@ -106,21 +117,26 @@ do_test (int argc, char **argv)
- if (ret != 0)
- exit (1);
-
-- exit (EXIT_SUCCESS);
-+ /* Special return code to make sure that the child executed all the way
-+ through. */
-+ exit (42);
- }
- else
- {
-- int ret = 0;
--
- /* Spawn tests. */
- for (int i = 0; i < array_length (teststrings); i++)
- {
- char buf[INT_BUFSIZE_BOUND (int)];
-
-- printf ("Spawned test for %s (%d)\n", teststrings[i], i);
-+ printf ("[%d] Spawned test for %s\n", i, teststrings[i]);
- snprintf (buf, sizeof (buf), "%d\n", i);
-+ fflush (stdout);
- if (setenv ("GLIBC_TUNABLES", teststrings[i], 1) != 0)
-- exit (1);
-+ {
-+ printf (" [%d] Failed to set GLIBC_TUNABLES: %m", i);
-+ support_record_failure ();
-+ continue;
-+ }
-
- int status = support_capture_subprogram_self_sgid (buf);
-
-@@ -128,9 +144,14 @@ do_test (int argc, char **argv)
- if (WEXITSTATUS (status) == EXIT_UNSUPPORTED)
- return EXIT_UNSUPPORTED;
-
-- ret |= status;
-+ if (WEXITSTATUS (status) != 42)
-+ {
-+ printf (" [%d] child failed with status %d\n", i,
-+ WEXITSTATUS (status));
-+ support_record_failure ();
-+ }
- }
-- return ret;
-+ return 0;
- }
- }
-
-diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
-index bee898c63c..cf32cf9b44 100644
---- a/iconv/iconv_prog.c
-+++ b/iconv/iconv_prog.c
-@@ -187,7 +187,7 @@ main (int argc, char *argv[])
-
- if (res != __GCONV_OK)
- {
-- if (errno == EINVAL)
-+ if (res == __GCONV_NOCONV || res == __GCONV_NODB)
- {
- /* Try to be nice with the user and tell her which of the
- two encoding names is wrong. This is possible because
-diff --git a/include/ifaddrs.h b/include/ifaddrs.h
-index 416118f1b3..19a3afb19f 100644
---- a/include/ifaddrs.h
-+++ b/include/ifaddrs.h
-@@ -34,9 +34,5 @@ extern void __check_native (uint32_t a1_index, int *a1_native,
- uint32_t a2_index, int *a2_native)
- attribute_hidden;
-
--#if IS_IN (nscd)
--extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
--#endif
--
- # endif /* !_ISOMAC */
- #endif /* ifaddrs.h */
-diff --git a/include/link.h b/include/link.h
-index 1d74feb2bd..69bda3ed17 100644
---- a/include/link.h
-+++ b/include/link.h
-@@ -278,6 +278,10 @@ struct link_map
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-
-+ /* Linked list of objects in reverse ELF constructor execution
-+ order. Head of list is stored in _dl_init_called_list. */
-+ struct link_map *l_init_called_next;
-+
- /* List of the dependencies introduced through symbol binding. */
- struct link_map_reldeps
- {
-diff --git a/inet/check_pf.c b/inet/check_pf.c
-index 5310c99121..6d1475920f 100644
---- a/inet/check_pf.c
-+++ b/inet/check_pf.c
-@@ -60,12 +60,3 @@ __free_in6ai (struct in6addrinfo *in6ai)
- {
- /* Nothing to do. */
- }
--
--
--#if IS_IN (nscd)
--uint32_t
--__bump_nl_timestamp (void)
--{
-- return 0;
--}
--#endif
-diff --git a/io/Makefile b/io/Makefile
-index 6ccc0e8691..8a3c83a3bb 100644
---- a/io/Makefile
-+++ b/io/Makefile
-@@ -192,6 +192,7 @@ tests := \
- tst-fchownat \
- tst-fcntl \
- tst-fcntl-lock \
-+ tst-fcntl-lock-lfs \
- tst-fstatat \
- tst-fts \
- tst-fts-lfs \
-diff --git a/io/tst-fcntl-lock-lfs.c b/io/tst-fcntl-lock-lfs.c
-new file mode 100644
-index 0000000000..f2a909fb02
---- /dev/null
-+++ b/io/tst-fcntl-lock-lfs.c
-@@ -0,0 +1,2 @@
-+#define _FILE_OFFSET_BITS 64
-+#include <io/tst-fcntl-lock.c>
-diff --git a/libio/vtables.c b/libio/vtables.c
-index 1d8ad612e9..34f7e15f1c 100644
---- a/libio/vtables.c
-+++ b/libio/vtables.c
-@@ -20,6 +20,7 @@
- #include <libioP.h>
- #include <stdio.h>
- #include <ldsodefs.h>
-+#include <array_length.h>
- #include <pointer_guard.h>
- #include <libio-macros.h>
-
-@@ -88,7 +89,7 @@
- # pragma weak __wprintf_buffer_as_file_xsputn
- #endif
-
--const struct _IO_jump_t __io_vtables[IO_VTABLES_LEN] attribute_relro =
-+const struct _IO_jump_t __io_vtables[] attribute_relro =
- {
- /* _IO_str_jumps */
- [IO_STR_JUMPS] =
-@@ -485,6 +486,8 @@ const struct _IO_jump_t __io_vtables[IO_VTABLES_LEN] attribute_relro =
- },
- #endif
- };
-+_Static_assert (array_length (__io_vtables) == IO_VTABLES_NUM,
-+ "initializer count");
-
- #ifdef SHARED
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index e2f1a615a4..d0bbbf3710 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -1086,6 +1086,11 @@ typedef struct malloc_chunk* mchunkptr;
-
- static void* _int_malloc(mstate, size_t);
- static void _int_free(mstate, mchunkptr, int);
-+static void _int_free_merge_chunk (mstate, mchunkptr, INTERNAL_SIZE_T);
-+static INTERNAL_SIZE_T _int_free_create_chunk (mstate,
-+ mchunkptr, INTERNAL_SIZE_T,
-+ mchunkptr, INTERNAL_SIZE_T);
-+static void _int_free_maybe_consolidate (mstate, INTERNAL_SIZE_T);
- static void* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
- INTERNAL_SIZE_T);
- static void* _int_memalign(mstate, size_t, size_t);
-@@ -4483,12 +4488,6 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- {
- INTERNAL_SIZE_T size; /* its size */
- mfastbinptr *fb; /* associated fastbin */
-- mchunkptr nextchunk; /* next contiguous chunk */
-- INTERNAL_SIZE_T nextsize; /* its size */
-- int nextinuse; /* true if nextchunk is used */
-- INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr fwd; /* misc temp for linking */
-
- size = chunksize (p);
-
-@@ -4637,31 +4636,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- if (!have_lock)
- __libc_lock_lock (av->mutex);
-
-- nextchunk = chunk_at_offset(p, size);
--
-- /* Lightweight tests: check whether the block is already the
-- top block. */
-- if (__glibc_unlikely (p == av->top))
-- malloc_printerr ("double free or corruption (top)");
-- /* Or whether the next chunk is beyond the boundaries of the arena. */
-- if (__builtin_expect (contiguous (av)
-- && (char *) nextchunk
-- >= ((char *) av->top + chunksize(av->top)), 0))
-- malloc_printerr ("double free or corruption (out)");
-- /* Or whether the block is actually not marked used. */
-- if (__glibc_unlikely (!prev_inuse(nextchunk)))
-- malloc_printerr ("double free or corruption (!prev)");
--
-- nextsize = chunksize(nextchunk);
-- if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-- || __builtin_expect (nextsize >= av->system_mem, 0))
-- malloc_printerr ("free(): invalid next size (normal)");
-+ _int_free_merge_chunk (av, p, size);
-
-- free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-+ if (!have_lock)
-+ __libc_lock_unlock (av->mutex);
-+ }
-+ /*
-+ If the chunk was allocated via mmap, release via munmap().
-+ */
-
-- /* consolidate backward */
-- if (!prev_inuse(p)) {
-- prevsize = prev_size (p);
-+ else {
-+ munmap_chunk (p);
-+ }
-+}
-+
-+/* Try to merge chunk P of SIZE bytes with its neighbors. Put the
-+ resulting chunk on the appropriate bin list. P must not be on a
-+ bin list yet, and it can be in use. */
-+static void
-+_int_free_merge_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size)
-+{
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+
-+ /* Lightweight tests: check whether the block is already the
-+ top block. */
-+ if (__glibc_unlikely (p == av->top))
-+ malloc_printerr ("double free or corruption (top)");
-+ /* Or whether the next chunk is beyond the boundaries of the arena. */
-+ if (__builtin_expect (contiguous (av)
-+ && (char *) nextchunk
-+ >= ((char *) av->top + chunksize(av->top)), 0))
-+ malloc_printerr ("double free or corruption (out)");
-+ /* Or whether the block is actually not marked used. */
-+ if (__glibc_unlikely (!prev_inuse(nextchunk)))
-+ malloc_printerr ("double free or corruption (!prev)");
-+
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-+ || __builtin_expect (nextsize >= av->system_mem, 0))
-+ malloc_printerr ("free(): invalid next size (normal)");
-+
-+ free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-+
-+ /* Consolidate backward. */
-+ if (!prev_inuse(p))
-+ {
-+ INTERNAL_SIZE_T prevsize = prev_size (p);
- size += prevsize;
- p = chunk_at_offset(p, -((long) prevsize));
- if (__glibc_unlikely (chunksize(p) != prevsize))
-@@ -4669,9 +4689,25 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- unlink_chunk (av, p);
- }
-
-- if (nextchunk != av->top) {
-+ /* Write the chunk header, maybe after merging with the following chunk. */
-+ size = _int_free_create_chunk (av, p, size, nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, size);
-+}
-+
-+/* Create a chunk at P of SIZE bytes, with SIZE potentially increased
-+ to cover the immediately following chunk NEXTCHUNK of NEXTSIZE
-+ bytes (if NEXTCHUNK is unused). The chunk at P is not actually
-+ read and does not have to be initialized. After creation, it is
-+ placed on the appropriate bin list. The function returns the size
-+ of the new chunk. */
-+static INTERNAL_SIZE_T
-+_int_free_create_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size,
-+ mchunkptr nextchunk, INTERNAL_SIZE_T nextsize)
-+{
-+ if (nextchunk != av->top)
-+ {
- /* get and clear inuse bit */
-- nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
-+ bool nextinuse = inuse_bit_at_offset (nextchunk, nextsize);
-
- /* consolidate forward */
- if (!nextinuse) {
-@@ -4686,8 +4722,8 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- been given one chance to be used in malloc.
- */
-
-- bck = unsorted_chunks(av);
-- fwd = bck->fd;
-+ mchunkptr bck = unsorted_chunks (av);
-+ mchunkptr fwd = bck->fd;
- if (__glibc_unlikely (fwd->bk != bck))
- malloc_printerr ("free(): corrupted unsorted chunks");
- p->fd = fwd;
-@@ -4706,61 +4742,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- check_free_chunk(av, p);
- }
-
-- /*
-- If the chunk borders the current high end of memory,
-- consolidate into top
-- */
--
-- else {
-+ else
-+ {
-+ /* If the chunk borders the current high end of memory,
-+ consolidate into top. */
- size += nextsize;
- set_head(p, size | PREV_INUSE);
- av->top = p;
- check_chunk(av, p);
- }
-
-- /*
-- If freeing a large space, consolidate possibly-surrounding
-- chunks. Then, if the total unused topmost memory exceeds trim
-- threshold, ask malloc_trim to reduce top.
--
-- Unless max_fast is 0, we don't know if there are fastbins
-- bordering top, so we cannot tell for sure whether threshold
-- has been reached unless fastbins are consolidated. But we
-- don't want to consolidate on each free. As a compromise,
-- consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD
-- is reached.
-- */
-+ return size;
-+}
-
-- if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {
-+/* If freeing a large space, consolidate possibly-surrounding
-+ chunks. Then, if the total unused topmost memory exceeds trim
-+ threshold, ask malloc_trim to reduce top. */
-+static void
-+_int_free_maybe_consolidate (mstate av, INTERNAL_SIZE_T size)
-+{
-+ /* Unless max_fast is 0, we don't know if there are fastbins
-+ bordering top, so we cannot tell for sure whether threshold has
-+ been reached unless fastbins are consolidated. But we don't want
-+ to consolidate on each free. As a compromise, consolidation is
-+ performed if FASTBIN_CONSOLIDATION_THRESHOLD is reached. */
-+ if (size >= FASTBIN_CONSOLIDATION_THRESHOLD)
-+ {
- if (atomic_load_relaxed (&av->have_fastchunks))
- malloc_consolidate(av);
-
-- if (av == &main_arena) {
-+ if (av == &main_arena)
-+ {
- #ifndef MORECORE_CANNOT_TRIM
-- if ((unsigned long)(chunksize(av->top)) >=
-- (unsigned long)(mp_.trim_threshold))
-- systrim(mp_.top_pad, av);
-+ if (chunksize (av->top) >= mp_.trim_threshold)
-+ systrim (mp_.top_pad, av);
- #endif
-- } else {
-- /* Always try heap_trim(), even if the top chunk is not
-- large, because the corresponding heap might go away. */
-- heap_info *heap = heap_for_ptr(top(av));
-+ }
-+ else
-+ {
-+ /* Always try heap_trim, even if the top chunk is not large,
-+ because the corresponding heap might go away. */
-+ heap_info *heap = heap_for_ptr (top (av));
-
-- assert(heap->ar_ptr == av);
-- heap_trim(heap, mp_.top_pad);
-- }
-+ assert (heap->ar_ptr == av);
-+ heap_trim (heap, mp_.top_pad);
-+ }
- }
--
-- if (!have_lock)
-- __libc_lock_unlock (av->mutex);
-- }
-- /*
-- If the chunk was allocated via mmap, release via munmap().
-- */
--
-- else {
-- munmap_chunk (p);
-- }
- }
-
- /*
-@@ -4999,42 +5026,6 @@ _int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
- ------------------------------ memalign ------------------------------
- */
-
--/* Returns 0 if the chunk is not and does not contain the requested
-- aligned sub-chunk, else returns the amount of "waste" from
-- trimming. NB is the *chunk* byte size, not the user byte
-- size. */
--static size_t
--chunk_ok_for_memalign (mchunkptr p, size_t alignment, size_t nb)
--{
-- void *m = chunk2mem (p);
-- INTERNAL_SIZE_T size = chunksize (p);
-- void *aligned_m = m;
--
-- if (__glibc_unlikely (misaligned_chunk (p)))
-- malloc_printerr ("_int_memalign(): unaligned chunk detected");
--
-- aligned_m = PTR_ALIGN_UP (m, alignment);
--
-- INTERNAL_SIZE_T front_extra = (intptr_t) aligned_m - (intptr_t) m;
--
-- /* We can't trim off the front as it's too small. */
-- if (front_extra > 0 && front_extra < MINSIZE)
-- return 0;
--
-- /* If it's a perfect fit, it's an exception to the return value rule
-- (we would return zero waste, which looks like "not usable"), so
-- handle it here by returning a small non-zero value instead. */
-- if (size == nb && front_extra == 0)
-- return 1;
--
-- /* If the block we need fits in the chunk, calculate total waste. */
-- if (size > nb + front_extra)
-- return size - nb;
--
-- /* Can't use this chunk. */
-- return 0;
--}
--
- /* BYTES is user requested bytes, not requested chunksize bytes. */
- static void *
- _int_memalign (mstate av, size_t alignment, size_t bytes)
-@@ -5049,7 +5040,6 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- mchunkptr remainder; /* spare room at end to split off */
- unsigned long remainder_size; /* its size */
- INTERNAL_SIZE_T size;
-- mchunkptr victim;
-
- nb = checked_request2size (bytes);
- if (nb == 0)
-@@ -5068,129 +5058,13 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- we don't find anything in those bins, the common malloc code will
- scan starting at 2x. */
-
-- /* This will be set if we found a candidate chunk. */
-- victim = NULL;
-+ /* Call malloc with worst case padding to hit alignment. */
-+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
-
-- /* Fast bins are singly-linked, hard to remove a chunk from the middle
-- and unlikely to meet our alignment requirements. We have not done
-- any experimentation with searching for aligned fastbins. */
--
-- if (av != NULL)
-- {
-- int first_bin_index;
-- int first_largebin_index;
-- int last_bin_index;
--
-- if (in_smallbin_range (nb))
-- first_bin_index = smallbin_index (nb);
-- else
-- first_bin_index = largebin_index (nb);
-+ if (m == 0)
-+ return 0; /* propagate failure */
-
-- if (in_smallbin_range (nb * 2))
-- last_bin_index = smallbin_index (nb * 2);
-- else
-- last_bin_index = largebin_index (nb * 2);
--
-- first_largebin_index = largebin_index (MIN_LARGE_SIZE);
--
-- int victim_index; /* its bin index */
--
-- for (victim_index = first_bin_index;
-- victim_index < last_bin_index;
-- victim_index ++)
-- {
-- victim = NULL;
--
-- if (victim_index < first_largebin_index)
-- {
-- /* Check small bins. Small bin chunks are doubly-linked despite
-- being the same size. */
--
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
-- while (fwd != bck)
-- {
-- if (chunk_ok_for_memalign (fwd, alignment, nb) > 0)
-- {
-- victim = fwd;
--
-- /* Unlink it */
-- victim->fd->bk = victim->bk;
-- victim->bk->fd = victim->fd;
-- break;
-- }
--
-- fwd = fwd->fd;
-- }
-- }
-- else
-- {
-- /* Check large bins. */
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr best = NULL;
-- size_t best_size = 0;
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
--
-- while (fwd != bck)
-- {
-- int extra;
--
-- if (chunksize (fwd) < nb)
-- break;
-- extra = chunk_ok_for_memalign (fwd, alignment, nb);
-- if (extra > 0
-- && (extra <= best_size || best == NULL))
-- {
-- best = fwd;
-- best_size = extra;
-- }
--
-- fwd = fwd->fd;
-- }
-- victim = best;
--
-- if (victim != NULL)
-- {
-- unlink_chunk (av, victim);
-- break;
-- }
-- }
--
-- if (victim != NULL)
-- break;
-- }
-- }
--
-- /* Strategy: find a spot within that chunk that meets the alignment
-- request, and then possibly free the leading and trailing space.
-- This strategy is incredibly costly and can lead to external
-- fragmentation if header and footer chunks are unused. */
--
-- if (victim != NULL)
-- {
-- p = victim;
-- m = chunk2mem (p);
-- set_inuse (p);
-- if (av != &main_arena)
-- set_non_main_arena (p);
-- }
-- else
-- {
-- /* Call malloc with worst case padding to hit alignment. */
--
-- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
--
-- if (m == 0)
-- return 0; /* propagate failure */
--
-- p = mem2chunk (m);
-- }
-+ p = mem2chunk (m);
-
- if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
- {
-@@ -5221,7 +5095,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- (av != &main_arena ? NON_MAIN_ARENA : 0));
- set_inuse_bit_at_offset (newp, newsize);
- set_head_size (p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
-- _int_free (av, p, 1);
-+ _int_free_merge_chunk (av, p, leadsize);
- p = newp;
-
- assert (newsize >= nb &&
-@@ -5232,15 +5106,27 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- if (!chunk_is_mmapped (p))
- {
- size = chunksize (p);
-- if ((unsigned long) (size) > (unsigned long) (nb + MINSIZE))
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (size > nb)
- {
- remainder_size = size - nb;
-- remainder = chunk_at_offset (p, nb);
-- set_head (remainder, remainder_size | PREV_INUSE |
-- (av != &main_arena ? NON_MAIN_ARENA : 0));
-- set_head_size (p, nb);
-- _int_free (av, remainder, 1);
-- }
-+ if (remainder_size >= MINSIZE
-+ || nextchunk == av->top
-+ || !inuse_bit_at_offset (nextchunk, nextsize))
-+ {
-+ /* We can only give back the tail if it is larger than
-+ MINSIZE, or if the following chunk is unused (top
-+ chunk or unused in-heap chunk). Otherwise we would
-+ create a chunk that is smaller than MINSIZE. */
-+ remainder = chunk_at_offset (p, nb);
-+ set_head_size (p, nb);
-+ remainder_size = _int_free_create_chunk (av, remainder,
-+ remainder_size,
-+ nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, remainder_size);
-+ }
-+ }
- }
-
- check_inuse_chunk (av, p);
-diff --git a/malloc/tst-memalign-2.c b/malloc/tst-memalign-2.c
-index f229283dbf..ecd6fa249e 100644
---- a/malloc/tst-memalign-2.c
-+++ b/malloc/tst-memalign-2.c
-@@ -86,7 +86,8 @@ do_test (void)
- TEST_VERIFY (tcache_allocs[i].ptr1 == tcache_allocs[i].ptr2);
- }
-
-- /* Test for non-head tcache hits. */
-+ /* Test for non-head tcache hits. This exercises the memalign
-+ scanning code to find matching allocations. */
- for (i = 0; i < array_length (ptr); ++ i)
- {
- if (i == 4)
-@@ -113,7 +114,9 @@ do_test (void)
- free (p);
- TEST_VERIFY (count > 0);
-
-- /* Large bins test. */
-+ /* Large bins test. This verifies that the over-allocated parts
-+ that memalign releases for future allocations can be reused by
-+ memalign itself at least in some cases. */
-
- for (i = 0; i < LN; ++ i)
- {
-diff --git a/manual/job.texi b/manual/job.texi
-index 42cb9fb26d..8157f13a1c 100644
---- a/manual/job.texi
-+++ b/manual/job.texi
-@@ -1133,6 +1133,7 @@ following @code{errno} error conditions are defined for this function:
- @table @code
- @item ESRCH
- There is no process with the given process ID @var{pid}.
-+@item EPERM
- The calling process and the process specified by @var{pid} are in
- different sessions, and the implementation doesn't allow to access the
- process group ID of the process with ID @var{pid} from the calling
-diff --git a/nscd/Makefile b/nscd/Makefile
-index 2a0489f4cf..16b6460ee9 100644
---- a/nscd/Makefile
-+++ b/nscd/Makefile
-@@ -35,7 +35,7 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \
- getgrnam_r getgrgid_r hstcache gethstbyad_r gethstbynm3_r \
- getsrvbynm_r getsrvbypt_r servicescache \
- dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
-- xmalloc xstrdup aicache initgrcache gai res_hconf \
-+ xmalloc xstrdup aicache initgrcache res_hconf \
- netgroupcache cachedumper
-
- ifeq ($(build-nscd)$(have-thread-library),yesyes)
-diff --git a/nscd/connections.c b/nscd/connections.c
-index a405a44a9b..15693e5090 100644
---- a/nscd/connections.c
-+++ b/nscd/connections.c
-@@ -256,6 +256,17 @@ int inotify_fd = -1;
- #ifdef HAVE_NETLINK
- /* Descriptor for netlink status updates. */
- static int nl_status_fd = -1;
-+
-+static uint32_t
-+__bump_nl_timestamp (void)
-+{
-+ static uint32_t nl_timestamp;
-+
-+ if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 == 0)
-+ atomic_fetch_add_relaxed (&nl_timestamp, 1);
-+
-+ return nl_timestamp;
-+}
- #endif
-
- /* Number of times clients had to wait. */
-diff --git a/nscd/gai.c b/nscd/gai.c
-deleted file mode 100644
-index e29f3fe583..0000000000
---- a/nscd/gai.c
-+++ /dev/null
-@@ -1,50 +0,0 @@
--/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published
-- by the Free Software Foundation; version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, see <https://www.gnu.org/licenses/>. */
--
--#include <alloca.h>
--#include <sys/stat.h>
--
--/* This file uses the getaddrinfo code but it compiles it without NSCD
-- support. We just need a few symbol renames. */
--#define __ioctl ioctl
--#define __getsockname getsockname
--#define __socket socket
--#define __recvmsg recvmsg
--#define __bind bind
--#define __sendto sendto
--#define __strchrnul strchrnul
--#define __getline getline
--#define __qsort_r qsort_r
--/* nscd uses 1MB or 2MB thread stacks. */
--#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
--#define __getifaddrs getifaddrs
--#define __freeifaddrs freeifaddrs
--#undef __fstat64
--#define __fstat64 fstat64
--#undef __stat64
--#define __stat64 stat64
--
--/* We are nscd, so we don't want to be talking to ourselves. */
--#undef USE_NSCD
--
--#include <getaddrinfo.c>
--
--/* Support code. */
--#include <check_pf.c>
--#include <check_native.c>
--
--/* Some variables normally defined in libc. */
--nss_action_list __nss_hosts_database attribute_hidden;
-diff --git a/nss/Makefile b/nss/Makefile
-index 06fcdc450f..668ba34b18 100644
---- a/nss/Makefile
-+++ b/nss/Makefile
-@@ -82,6 +82,7 @@ tests-container := \
- tst-nss-test3 \
- tst-reload1 \
- tst-reload2 \
-+ tst-nss-gai-hv2-canonname \
- # tests-container
-
- # Tests which need libdl
-@@ -145,7 +146,17 @@ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
- ifeq ($(build-static-nss),yes)
- tests-static += tst-nss-static
- endif
--extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os
-+extra-test-objs += nss_test1.os nss_test2.os nss_test_errno.os \
-+ nss_test_gai_hv2_canonname.os
-+
-+ifeq ($(run-built-tests),yes)
-+ifneq (no,$(PERL))
-+tests-special += $(objpfx)mtrace-tst-nss-gai-hv2-canonname.out
-+endif
-+endif
-+
-+generated += mtrace-tst-nss-gai-hv2-canonname.out \
-+ tst-nss-gai-hv2-canonname.mtrace
-
- include ../Rules
-
-@@ -180,12 +191,16 @@ rtld-tests-LDFLAGS += -Wl,--dynamic-list=nss_test.ver
- libof-nss_test1 = extramodules
- libof-nss_test2 = extramodules
- libof-nss_test_errno = extramodules
-+libof-nss_test_gai_hv2_canonname = extramodules
- $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps)
- $(build-module)
- $(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps)
- $(build-module)
- $(objpfx)/libnss_test_errno.so: $(objpfx)nss_test_errno.os $(link-libc-deps)
- $(build-module)
-+$(objpfx)/libnss_test_gai_hv2_canonname.so: \
-+ $(objpfx)nss_test_gai_hv2_canonname.os $(link-libc-deps)
-+ $(build-module)
- $(objpfx)nss_test2.os : nss_test1.c
- # Use the nss_files suffix for these objects as well.
- $(objpfx)/libnss_test1.so$(libnss_files.so-version): $(objpfx)/libnss_test1.so
-@@ -195,10 +210,14 @@ $(objpfx)/libnss_test2.so$(libnss_files.so-version): $(objpfx)/libnss_test2.so
- $(objpfx)/libnss_test_errno.so$(libnss_files.so-version): \
- $(objpfx)/libnss_test_errno.so
- $(make-link)
-+$(objpfx)/libnss_test_gai_hv2_canonname.so$(libnss_files.so-version): \
-+ $(objpfx)/libnss_test_gai_hv2_canonname.so
-+ $(make-link)
- $(patsubst %,$(objpfx)%.out,$(tests) $(tests-container)) : \
- $(objpfx)/libnss_test1.so$(libnss_files.so-version) \
- $(objpfx)/libnss_test2.so$(libnss_files.so-version) \
-- $(objpfx)/libnss_test_errno.so$(libnss_files.so-version)
-+ $(objpfx)/libnss_test_errno.so$(libnss_files.so-version) \
-+ $(objpfx)/libnss_test_gai_hv2_canonname.so$(libnss_files.so-version)
-
- ifeq (yes,$(have-thread-library))
- $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library)
-@@ -207,6 +226,17 @@ endif
- $(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so
- $(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so
-
-+tst-nss-gai-hv2-canonname-ENV = \
-+ MALLOC_TRACE=$(objpfx)tst-nss-gai-hv2-canonname.mtrace \
-+ LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
-+$(objpfx)mtrace-tst-nss-gai-hv2-canonname.out: \
-+ $(objpfx)tst-nss-gai-hv2-canonname.out
-+ { test -r $(objpfx)tst-nss-gai-hv2-canonname.mtrace \
-+ || ( echo "tst-nss-gai-hv2-canonname.mtrace does not exist"; exit 77; ) \
-+ && $(common-objpfx)malloc/mtrace \
-+ $(objpfx)tst-nss-gai-hv2-canonname.mtrace; } > $@; \
-+ $(evaluate-test)
-+
- # Disable DT_RUNPATH on NSS tests so that the glibc internal NSS
- # functions can load testing NSS modules via DT_RPATH.
- LDFLAGS-tst-nss-test1 = -Wl,--disable-new-dtags
-@@ -215,3 +245,4 @@ LDFLAGS-tst-nss-test3 = -Wl,--disable-new-dtags
- LDFLAGS-tst-nss-test4 = -Wl,--disable-new-dtags
- LDFLAGS-tst-nss-test5 = -Wl,--disable-new-dtags
- LDFLAGS-tst-nss-test_errno = -Wl,--disable-new-dtags
-+LDFLAGS-tst-nss-test_gai_hv2_canonname = -Wl,--disable-new-dtags
-diff --git a/nss/nss_test_gai_hv2_canonname.c b/nss/nss_test_gai_hv2_canonname.c
-new file mode 100644
-index 0000000000..4439c83c9f
---- /dev/null
-+++ b/nss/nss_test_gai_hv2_canonname.c
-@@ -0,0 +1,56 @@
-+/* NSS service provider that only provides gethostbyname2_r.
-+ Copyright The GNU Toolchain Authors.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <https://www.gnu.org/licenses/>. */
-+
-+#include <nss.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include "nss/tst-nss-gai-hv2-canonname.h"
-+
-+/* Catch misnamed and functions. */
-+#pragma GCC diagnostic error "-Wmissing-prototypes"
-+NSS_DECLARE_MODULE_FUNCTIONS (test_gai_hv2_canonname)
-+
-+extern enum nss_status _nss_files_gethostbyname2_r (const char *, int,
-+ struct hostent *, char *,
-+ size_t, int *, int *);
-+
-+enum nss_status
-+_nss_test_gai_hv2_canonname_gethostbyname2_r (const char *name, int af,
-+ struct hostent *result,
-+ char *buffer, size_t buflen,
-+ int *errnop, int *herrnop)
-+{
-+ return _nss_files_gethostbyname2_r (name, af, result, buffer, buflen, errnop,
-+ herrnop);
-+}
-+
-+enum nss_status
-+_nss_test_gai_hv2_canonname_getcanonname_r (const char *name, char *buffer,
-+ size_t buflen, char **result,
-+ int *errnop, int *h_errnop)
-+{
-+ /* We expect QUERYNAME, which is a small enough string that it shouldn't fail
-+ the test. */
-+ if (memcmp (QUERYNAME, name, sizeof (QUERYNAME))
-+ || buflen < sizeof (QUERYNAME))
-+ abort ();
-+
-+ strncpy (buffer, name, buflen);
-+ *result = buffer;
-+ return NSS_STATUS_SUCCESS;
-+}
-diff --git a/nss/tst-nss-gai-hv2-canonname.c b/nss/tst-nss-gai-hv2-canonname.c
-new file mode 100644
-index 0000000000..7db53cf09d
---- /dev/null
-+++ b/nss/tst-nss-gai-hv2-canonname.c
-@@ -0,0 +1,66 @@
-+/* Test NSS query path for plugins that only implement gethostbyname2
-+ (#30843).
-+ Copyright The GNU Toolchain Authors.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <https://www.gnu.org/licenses/>. */
-+
-+#include <nss.h>
-+#include <netdb.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <mcheck.h>
-+#include <support/check.h>
-+#include <support/xstdio.h>
-+#include "nss/tst-nss-gai-hv2-canonname.h"
-+
-+#define PREPARE do_prepare
-+
-+static void do_prepare (int a, char **av)
-+{
-+ FILE *hosts = xfopen ("/etc/hosts", "w");
-+ for (unsigned i = 2; i < 255; i++)
-+ {
-+ fprintf (hosts, "ff01::ff02:ff03:%u:2\ttest.example.com\n", i);
-+ fprintf (hosts, "192.168.0.%u\ttest.example.com\n", i);
-+ }
-+ xfclose (hosts);
-+}
-+
-+static int
-+do_test (void)
-+{
-+ mtrace ();
-+
-+ __nss_configure_lookup ("hosts", "test_gai_hv2_canonname");
-+
-+ struct addrinfo hints = {};
-+ struct addrinfo *result = NULL;
-+
-+ hints.ai_family = AF_INET6;
-+ hints.ai_flags = AI_ALL | AI_V4MAPPED | AI_CANONNAME;
-+
-+ int ret = getaddrinfo (QUERYNAME, NULL, &hints, &result);
-+
-+ if (ret != 0)
-+ FAIL_EXIT1 ("getaddrinfo failed: %s\n", gai_strerror (ret));
-+
-+ TEST_COMPARE_STRING (result->ai_canonname, QUERYNAME);
-+
-+ freeaddrinfo(result);
-+ return 0;
-+}
-+
-+#include <support/test-driver.c>
-diff --git a/nss/tst-nss-gai-hv2-canonname.h b/nss/tst-nss-gai-hv2-canonname.h
-new file mode 100644
-index 0000000000..14f2a9cb08
---- /dev/null
-+++ b/nss/tst-nss-gai-hv2-canonname.h
-@@ -0,0 +1 @@
-+#define QUERYNAME "test.example.com"
-diff --git a/nss/tst-nss-gai-hv2-canonname.root/postclean.req b/nss/tst-nss-gai-hv2-canonname.root/postclean.req
-new file mode 100644
-index 0000000000..e69de29bb2
-diff --git a/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script b/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script
-new file mode 100644
-index 0000000000..31848b4a28
---- /dev/null
-+++ b/nss/tst-nss-gai-hv2-canonname.root/tst-nss-gai-hv2-canonname.script
-@@ -0,0 +1,2 @@
-+cp $B/nss/libnss_test_gai_hv2_canonname.so $L/libnss_test_gai_hv2_canonname.so.2
-+su
-diff --git a/resolv/Makefile b/resolv/Makefile
-index 054b1fa36c..2f99eb3862 100644
---- a/resolv/Makefile
-+++ b/resolv/Makefile
-@@ -102,6 +102,7 @@ tests += \
- tst-resolv-invalid-cname \
- tst-resolv-network \
- tst-resolv-noaaaa \
-+ tst-resolv-noaaaa-vc \
- tst-resolv-nondecimal \
- tst-resolv-res_init-multi \
- tst-resolv-search \
-@@ -293,6 +294,7 @@ $(objpfx)tst-resolv-res_init-thread: $(objpfx)libresolv.so \
- $(objpfx)tst-resolv-invalid-cname: $(objpfx)libresolv.so \
- $(shared-thread-library)
- $(objpfx)tst-resolv-noaaaa: $(objpfx)libresolv.so $(shared-thread-library)
-+$(objpfx)tst-resolv-noaaaa-vc: $(objpfx)libresolv.so $(shared-thread-library)
- $(objpfx)tst-resolv-nondecimal: $(objpfx)libresolv.so $(shared-thread-library)
- $(objpfx)tst-resolv-qtypes: $(objpfx)libresolv.so $(shared-thread-library)
- $(objpfx)tst-resolv-rotate: $(objpfx)libresolv.so $(shared-thread-library)
-diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
-index 1d60c51f5e..5d0ab30de6 100644
---- a/resolv/nss_dns/dns-host.c
-+++ b/resolv/nss_dns/dns-host.c
-@@ -427,7 +427,7 @@ _nss_dns_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
- {
- n = __res_context_search (ctx, name, C_IN, T_A,
- dns_packet_buffer, sizeof (dns_packet_buffer),
-- NULL, NULL, NULL, NULL, NULL);
-+ &alt_dns_packet_buffer, NULL, NULL, NULL, NULL);
- if (n >= 0)
- status = gaih_getanswer_noaaaa (alt_dns_packet_buffer, n,
- &abuf, pat, errnop, herrnop, ttlp);
-diff --git a/resolv/tst-resolv-noaaaa-vc.c b/resolv/tst-resolv-noaaaa-vc.c
-new file mode 100644
-index 0000000000..9f5aebd99f
---- /dev/null
-+++ b/resolv/tst-resolv-noaaaa-vc.c
-@@ -0,0 +1,129 @@
-+/* Test the RES_NOAAAA resolver option with a large response.
-+ Copyright (C) 2022-2023 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <https://www.gnu.org/licenses/>. */
-+
-+#include <errno.h>
-+#include <netdb.h>
-+#include <resolv.h>
-+#include <stdbool.h>
-+#include <stdlib.h>
-+#include <support/check.h>
-+#include <support/check_nss.h>
-+#include <support/resolv_test.h>
-+#include <support/support.h>
-+#include <support/xmemstream.h>
-+
-+/* Used to keep track of the number of queries. */
-+static volatile unsigned int queries;
-+
-+/* If true, add a large TXT record at the start of the answer section. */
-+static volatile bool stuff_txt;
-+
-+static void
-+response (const struct resolv_response_context *ctx,
-+ struct resolv_response_builder *b,
-+ const char *qname, uint16_t qclass, uint16_t qtype)
-+{
-+ /* If not using TCP, just force its use. */
-+ if (!ctx->tcp)
-+ {
-+ struct resolv_response_flags flags = {.tc = true};
-+ resolv_response_init (b, flags);
-+ resolv_response_add_question (b, qname, qclass, qtype);
-+ return;
-+ }
-+
-+ /* The test needs to send four queries, the first three are used to
-+ grow the NSS buffer via the ERANGE handshake. */
-+ ++queries;
-+ TEST_VERIFY (queries <= 4);
-+
-+ /* AAAA queries are supposed to be disabled. */
-+ TEST_COMPARE (qtype, T_A);
-+ TEST_COMPARE (qclass, C_IN);
-+ TEST_COMPARE_STRING (qname, "example.com");
-+
-+ struct resolv_response_flags flags = {};
-+ resolv_response_init (b, flags);
-+ resolv_response_add_question (b, qname, qclass, qtype);
-+
-+ resolv_response_section (b, ns_s_an);
-+
-+ if (stuff_txt)
-+ {
-+ resolv_response_open_record (b, qname, qclass, T_TXT, 60);
-+ int zero = 0;
-+ for (int i = 0; i <= 15000; ++i)
-+ resolv_response_add_data (b, &zero, sizeof (zero));
-+ resolv_response_close_record (b);
-+ }
-+
-+ for (int i = 0; i < 200; ++i)
-+ {
-+ resolv_response_open_record (b, qname, qclass, qtype, 60);
-+ char ipv4[4] = {192, 0, 2, i + 1};
-+ resolv_response_add_data (b, &ipv4, sizeof (ipv4));
-+ resolv_response_close_record (b);
-+ }
-+}
-+
-+static int
-+do_test (void)
-+{
-+ struct resolv_test *obj = resolv_test_start
-+ ((struct resolv_redirect_config)
-+ {
-+ .response_callback = response
-+ });
-+
-+ _res.options |= RES_NOAAAA;
-+
-+ for (int do_stuff_txt = 0; do_stuff_txt < 2; ++do_stuff_txt)
-+ {
-+ queries = 0;
-+ stuff_txt = do_stuff_txt;
-+
-+ struct addrinfo *ai = NULL;
-+ int ret;
-+ ret = getaddrinfo ("example.com", "80",
-+ &(struct addrinfo)
-+ {
-+ .ai_family = AF_UNSPEC,
-+ .ai_socktype = SOCK_STREAM,
-+ }, &ai);
-+
-+ char *expected_result;
-+ {
-+ struct xmemstream mem;
-+ xopen_memstream (&mem);
-+ for (int i = 0; i < 200; ++i)
-+ fprintf (mem.out, "address: STREAM/TCP 192.0.2.%d 80\n", i + 1);
-+ xfclose_memstream (&mem);
-+ expected_result = mem.buffer;
-+ }
-+
-+ check_addrinfo ("example.com", ai, ret, expected_result);
-+
-+ free (expected_result);
-+ freeaddrinfo (ai);
-+ }
-+
-+ resolv_test_end (obj);
-+ return 0;
-+}
-+
-+#include <support/test-driver.c>
-diff --git a/stdlib/tst-realpath.c b/stdlib/tst-realpath.c
-index f325c95a44..3694ecd8af 100644
---- a/stdlib/tst-realpath.c
-+++ b/stdlib/tst-realpath.c
-@@ -24,6 +24,7 @@
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-+#include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <malloc.h>
-@@ -50,7 +51,11 @@ void dealloc (void *p)
-
- char* alloc (void)
- {
-- return (char *)malloc (8);
-+#ifdef PATH_MAX
-+ return (char *)malloc (PATH_MAX);
-+#else
-+ return (char *)malloc (4096);
-+#endif
- }
-
- static int
-diff --git a/string/tester.c b/string/tester.c
-index f7d4bac5a8..824cf315ff 100644
---- a/string/tester.c
-+++ b/string/tester.c
-@@ -34,6 +34,14 @@
- DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-truncation");
- #endif
-
-+/* When building with fortify enabled, GCC < 12 issues a warning on the
-+ fortify strncat wrapper might overflow the destination buffer (the
-+ failure is tied to -Werror).
-+ Triggered by strncat fortify wrapper when it is enabled. */
-+#if __GNUC_PREREQ (11, 0)
-+DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
-+#endif
-+
- #include <errno.h>
- #include <stdint.h>
- #include <stdio.h>
-@@ -52,9 +60,6 @@ DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args");
- DIAG_IGNORE_NEEDS_COMMENT (9, "-Wrestrict");
- DIAG_IGNORE_NEEDS_COMMENT (7, "-Wstringop-overflow=");
- #endif
--#if __GNUC_PREREQ (11, 0)
--DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
--#endif
-
-
- #define STREQ(a, b) (strcmp((a), (b)) == 0)
-diff --git a/sysdeps/generic/unsecvars.h b/sysdeps/generic/unsecvars.h
-index 81397fb90b..8278c50a84 100644
---- a/sysdeps/generic/unsecvars.h
-+++ b/sysdeps/generic/unsecvars.h
-@@ -4,7 +4,6 @@
- #define UNSECURE_ENVVARS \
- "GCONV_PATH\0" \
- "GETCONF_DIR\0" \
-- "GLIBC_TUNABLES\0" \
- "HOSTALIASES\0" \
- "LD_AUDIT\0" \
- "LD_DEBUG\0" \
-diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
-index 9b48ec0ea1..b86af4aac9 100644
---- a/sysdeps/i386/i686/memcpy.S
-+++ b/sysdeps/i386/i686/memcpy.S
-@@ -27,7 +27,7 @@
- #define LEN SRC+4
-
- .text
--#if defined PIC && IS_IN (libc)
-+#if defined SHARED && IS_IN (libc)
- ENTRY_CHK (__memcpy_chk)
- movl 12(%esp), %eax
- cmpl %eax, 16(%esp)
-diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S
-index 26f8501e7d..14d9dd681a 100644
---- a/sysdeps/i386/i686/mempcpy.S
-+++ b/sysdeps/i386/i686/mempcpy.S
-@@ -27,7 +27,7 @@
- #define LEN SRC+4
-
- .text
--#if defined PIC && IS_IN (libc)
-+#if defined SHARED && IS_IN (libc)
- ENTRY_CHK (__mempcpy_chk)
- movl 12(%esp), %eax
- cmpl %eax, 16(%esp)
-diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.c b/sysdeps/i386/i686/multiarch/memcpy_chk.c
-index ec945dc91f..c3a8aeaf18 100644
---- a/sysdeps/i386/i686/multiarch/memcpy_chk.c
-+++ b/sysdeps/i386/i686/multiarch/memcpy_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memcpy_chk, __memcpy_chk,
- __hidden_ver1 (__memcpy_chk, __GI___memcpy_chk, __redirect_memcpy_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memcpy_chk);
- # endif
-+#else
-+# include <debug/memcpy_chk.c>
- #endif
-diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.c b/sysdeps/i386/i686/multiarch/memmove_chk.c
-index 55c7601d5d..070dde083a 100644
---- a/sysdeps/i386/i686/multiarch/memmove_chk.c
-+++ b/sysdeps/i386/i686/multiarch/memmove_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memmove_chk, __memmove_chk,
- __hidden_ver1 (__memmove_chk, __GI___memmove_chk, __redirect_memmove_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memmove_chk);
- # endif
-+#else
-+# include <debug/memmove_chk.c>
- #endif
-diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.c b/sysdeps/i386/i686/multiarch/mempcpy_chk.c
-index 83569cf9d9..14360f1828 100644
---- a/sysdeps/i386/i686/multiarch/mempcpy_chk.c
-+++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_mempcpy_chk, __mempcpy_chk,
- __hidden_ver1 (__mempcpy_chk, __GI___mempcpy_chk, __redirect_mempcpy_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__mempcpy_chk);
- # endif
-+#else
-+# include <debug/mempcpy_chk.c>
- #endif
-diff --git a/sysdeps/i386/i686/multiarch/memset_chk.c b/sysdeps/i386/i686/multiarch/memset_chk.c
-index 1a7503858d..8179ef7c0b 100644
---- a/sysdeps/i386/i686/multiarch/memset_chk.c
-+++ b/sysdeps/i386/i686/multiarch/memset_chk.c
-@@ -32,4 +32,6 @@ libc_ifunc_redirected (__redirect_memset_chk, __memset_chk,
- __hidden_ver1 (__memset_chk, __GI___memset_chk, __redirect_memset_chk)
- __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__memset_chk);
- # endif
-+#else
-+# include <debug/memset_chk.c>
- #endif
-diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
-index 0356b622be..13082305d3 100644
---- a/sysdeps/posix/getaddrinfo.c
-+++ b/sysdeps/posix/getaddrinfo.c
-@@ -120,6 +120,7 @@ struct gaih_result
- {
- struct gaih_addrtuple *at;
- char *canon;
-+ char *h_name;
- bool free_at;
- bool got_ipv6;
- };
-@@ -165,6 +166,7 @@ gaih_result_reset (struct gaih_result *res)
- if (res->free_at)
- free (res->at);
- free (res->canon);
-+ free (res->h_name);
- memset (res, 0, sizeof (*res));
- }
-
-@@ -203,9 +205,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
- return 0;
- }
-
--/* Convert struct hostent to a list of struct gaih_addrtuple objects. h_name
-- is not copied, and the struct hostent object must not be deallocated
-- prematurely. The new addresses are appended to the tuple array in RES. */
-+/* Convert struct hostent to a list of struct gaih_addrtuple objects. The new
-+ addresses are appended to the tuple array in RES. */
- static bool
- convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
- struct hostent *h, struct gaih_result *res)
-@@ -238,6 +239,15 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
- res->at = array;
- res->free_at = true;
-
-+ /* Duplicate h_name because it may get reclaimed when the underlying storage
-+ is freed. */
-+ if (res->h_name == NULL)
-+ {
-+ res->h_name = __strdup (h->h_name);
-+ if (res->h_name == NULL)
-+ return false;
-+ }
-+
- /* Update the next pointers on reallocation. */
- for (size_t i = 0; i < old; i++)
- array[i].next = array + i + 1;
-@@ -262,7 +272,6 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, int family,
- }
- array[i].next = array + i + 1;
- }
-- array[0].name = h->h_name;
- array[count - 1].next = NULL;
-
- return true;
-@@ -324,15 +333,15 @@ gethosts (nss_gethostbyname3_r fct, int family, const char *name,
- memory allocation failure. The returned string is allocated on the
- heap; the caller has to free it. */
- static char *
--getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name)
-+getcanonname (nss_action_list nip, const char *hname, const char *name)
- {
- nss_getcanonname_r *cfct = __nss_lookup_function (nip, "getcanonname_r");
- char *s = (char *) name;
- if (cfct != NULL)
- {
- char buf[256];
-- if (DL_CALL_FCT (cfct, (at->name ?: name, buf, sizeof (buf),
-- &s, &errno, &h_errno)) != NSS_STATUS_SUCCESS)
-+ if (DL_CALL_FCT (cfct, (hname ?: name, buf, sizeof (buf), &s, &errno,
-+ &h_errno)) != NSS_STATUS_SUCCESS)
- /* If the canonical name cannot be determined, use the passed
- string. */
- s = (char *) name;
-@@ -771,7 +780,7 @@ get_nss_addresses (const char *name, const struct addrinfo *req,
- if ((req->ai_flags & AI_CANONNAME) != 0
- && res->canon == NULL)
- {
-- char *canonbuf = getcanonname (nip, res->at, name);
-+ char *canonbuf = getcanonname (nip, res->h_name, name);
- if (canonbuf == NULL)
- {
- __resolv_context_put (res_ctx);
-@@ -1187,9 +1196,7 @@ free_and_return:
- if (malloc_name)
- free ((char *) name);
- free (addrmem);
-- if (res.free_at)
-- free (res.at);
-- free (res.canon);
-+ gaih_result_reset (&res);
-
- return result;
- }
-diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
-index 2b0b8b6368..3aa6a00348 100644
---- a/sysdeps/unix/sysv/linux/check_pf.c
-+++ b/sysdeps/unix/sysv/linux/check_pf.c
-@@ -66,25 +66,10 @@ static struct cached_data *cache;
- __libc_lock_define_initialized (static, lock);
-
-
--#if IS_IN (nscd)
--static uint32_t nl_timestamp;
--
--uint32_t
--__bump_nl_timestamp (void)
--{
-- if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 == 0)
-- atomic_fetch_add_relaxed (&nl_timestamp, 1);
--
-- return nl_timestamp;
--}
--#endif
--
- static inline uint32_t
- get_nl_timestamp (void)
- {
--#if IS_IN (nscd)
-- return nl_timestamp;
--#elif defined USE_NSCD
-+#if defined USE_NSCD
- return __nscd_get_nl_timestamp ();
- #else
- return 0;
-diff --git a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-index 51d4a1b082..822c41fceb 100644
---- a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-+++ b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-@@ -52,7 +52,14 @@ xset_thread_area (struct user_desc *u_info)
- static void
- xmodify_ldt (int func, const void *ptr, unsigned long bytecount)
- {
-- TEST_VERIFY_EXIT (syscall (SYS_modify_ldt, 1, ptr, bytecount) == 0);
-+ long ret = syscall (SYS_modify_ldt, func, ptr, bytecount);
-+
-+ if (ret == -1)
-+ {
-+ if (errno == ENOSYS)
-+ FAIL_UNSUPPORTED ("modify_ldt not supported");
-+ FAIL_EXIT1 ("modify_ldt failed (errno=%d)", errno);
-+ }
- }
-
- static int
-diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
-index f7615a447e..d8a291a331 100644
---- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
-+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
-@@ -33,7 +33,7 @@
- # define __O_LARGEFILE 0200000
- #endif
-
--#if __WORDSIZE == 64
-+#if __WORDSIZE == 64 && !defined __USE_FILE_OFFSET64
- # define F_GETLK 5
- # define F_SETLK 6
- # define F_SETLKW 7
-diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
-index cd4d0351ae..5ddb35c9d9 100644
---- a/sysdeps/x86/dl-cacheinfo.h
-+++ b/sysdeps/x86/dl-cacheinfo.h
-@@ -315,40 +315,206 @@ handle_amd (int name)
- {
- unsigned int eax;
- unsigned int ebx;
-- unsigned int ecx;
-+ unsigned int ecx = 0;
- unsigned int edx;
-- unsigned int count = 0x1;
-+ unsigned int max_cpuid = 0;
-+ unsigned int fn = 0;
-
- /* No level 4 cache (yet). */
- if (name > _SC_LEVEL3_CACHE_LINESIZE)
- return 0;
-
-- if (name >= _SC_LEVEL3_CACHE_SIZE)
-- count = 0x3;
-- else if (name >= _SC_LEVEL2_CACHE_SIZE)
-- count = 0x2;
-- else if (name >= _SC_LEVEL1_DCACHE_SIZE)
-- count = 0x0;
-+ __cpuid (0x80000000, max_cpuid, ebx, ecx, edx);
-+
-+ if (max_cpuid >= 0x8000001D)
-+ /* Use __cpuid__ '0x8000_001D' to compute cache details. */
-+ {
-+ unsigned int count = 0x1;
-+
-+ if (name >= _SC_LEVEL3_CACHE_SIZE)
-+ count = 0x3;
-+ else if (name >= _SC_LEVEL2_CACHE_SIZE)
-+ count = 0x2;
-+ else if (name >= _SC_LEVEL1_DCACHE_SIZE)
-+ count = 0x0;
-+
-+ __cpuid_count (0x8000001D, count, eax, ebx, ecx, edx);
-+
-+ if (ecx != 0)
-+ {
-+ switch (name)
-+ {
-+ case _SC_LEVEL1_ICACHE_ASSOC:
-+ case _SC_LEVEL1_DCACHE_ASSOC:
-+ case _SC_LEVEL2_CACHE_ASSOC:
-+ case _SC_LEVEL3_CACHE_ASSOC:
-+ return ((ebx >> 22) & 0x3ff) + 1;
-+ case _SC_LEVEL1_ICACHE_LINESIZE:
-+ case _SC_LEVEL1_DCACHE_LINESIZE:
-+ case _SC_LEVEL2_CACHE_LINESIZE:
-+ case _SC_LEVEL3_CACHE_LINESIZE:
-+ return (ebx & 0xfff) + 1;
-+ case _SC_LEVEL1_ICACHE_SIZE:
-+ case _SC_LEVEL1_DCACHE_SIZE:
-+ case _SC_LEVEL2_CACHE_SIZE:
-+ case _SC_LEVEL3_CACHE_SIZE:
-+ return (((ebx >> 22) & 0x3ff) + 1) * ((ebx & 0xfff) + 1) * (ecx + 1);
-+ default:
-+ __builtin_unreachable ();
-+ }
-+ return -1;
-+ }
-+ }
-+
-+ /* Legacy cache computation for CPUs prior to Bulldozer family.
-+ This is also a fail-safe mechanism for some hypervisors that
-+ accidentally configure __cpuid__ '0x8000_001D' to Zero. */
-+
-+ fn = 0x80000005 + (name >= _SC_LEVEL2_CACHE_SIZE);
-+
-+ if (max_cpuid < fn)
-+ return 0;
-+
-+ __cpuid (fn, eax, ebx, ecx, edx);
-
-- __cpuid_count (0x8000001D, count, eax, ebx, ecx, edx);
-+ if (name < _SC_LEVEL1_DCACHE_SIZE)
-+ {
-+ name += _SC_LEVEL1_DCACHE_SIZE - _SC_LEVEL1_ICACHE_SIZE;
-+ ecx = edx;
-+ }
-
- switch (name)
- {
-- case _SC_LEVEL1_ICACHE_ASSOC:
-- case _SC_LEVEL1_DCACHE_ASSOC:
-- case _SC_LEVEL2_CACHE_ASSOC:
-+ case _SC_LEVEL1_DCACHE_SIZE:
-+ return (ecx >> 14) & 0x3fc00;
-+
-+ case _SC_LEVEL1_DCACHE_ASSOC:
-+ ecx >>= 16;
-+ if ((ecx & 0xff) == 0xff)
-+ {
-+ /* Fully associative. */
-+ return (ecx << 2) & 0x3fc00;
-+ }
-+ return ecx & 0xff;
-+
-+ case _SC_LEVEL1_DCACHE_LINESIZE:
-+ return ecx & 0xff;
-+
-+ case _SC_LEVEL2_CACHE_SIZE:
-+ return (ecx & 0xf000) == 0 ? 0 : (ecx >> 6) & 0x3fffc00;
-+
-+ case _SC_LEVEL2_CACHE_ASSOC:
-+ switch ((ecx >> 12) & 0xf)
-+ {
-+ case 0:
-+ case 1:
-+ case 2:
-+ case 4:
-+ return (ecx >> 12) & 0xf;
-+ case 6:
-+ return 8;
-+ case 8:
-+ return 16;
-+ case 10:
-+ return 32;
-+ case 11:
-+ return 48;
-+ case 12:
-+ return 64;
-+ case 13:
-+ return 96;
-+ case 14:
-+ return 128;
-+ case 15:
-+ return ((ecx >> 6) & 0x3fffc00) / (ecx & 0xff);
-+ default:
-+ return 0;
-+ }
-+
-+ case _SC_LEVEL2_CACHE_LINESIZE:
-+ return (ecx & 0xf000) == 0 ? 0 : ecx & 0xff;
-+
-+ case _SC_LEVEL3_CACHE_SIZE:
-+ {
-+ long int total_l3_cache = 0, l3_cache_per_thread = 0;
-+ unsigned int threads = 0;
-+ const struct cpu_features *cpu_features;
-+
-+ if ((edx & 0xf000) == 0)
-+ return 0;
-+
-+ total_l3_cache = (edx & 0x3ffc0000) << 1;
-+ cpu_features = __get_cpu_features ();
-+
-+ /* Figure out the number of logical threads that share L3. */
-+ if (max_cpuid >= 0x80000008)
-+ {
-+ /* Get width of APIC ID. */
-+ __cpuid (0x80000008, eax, ebx, ecx, edx);
-+ threads = (ecx & 0xff) + 1;
-+ }
-+
-+ if (threads == 0)
-+ {
-+ /* If APIC ID width is not available, use logical
-+ processor count. */
-+ __cpuid (0x00000001, eax, ebx, ecx, edx);
-+ if ((edx & (1 << 28)) != 0)
-+ threads = (ebx >> 16) & 0xff;
-+ }
-+
-+ /* Cap usage of highest cache level to the number of
-+ supported threads. */
-+ if (threads > 0)
-+ l3_cache_per_thread = total_l3_cache/threads;
-+
-+ /* Get shared cache per ccx for Zen architectures. */
-+ if (cpu_features->basic.family >= 0x17)
-+ {
-+ long int l3_cache_per_ccx = 0;
-+ /* Get number of threads share the L3 cache in CCX. */
-+ __cpuid_count (0x8000001D, 0x3, eax, ebx, ecx, edx);
-+ unsigned int threads_per_ccx = ((eax >> 14) & 0xfff) + 1;
-+ l3_cache_per_ccx = l3_cache_per_thread * threads_per_ccx;
-+ return l3_cache_per_ccx;
-+ }
-+ else
-+ {
-+ return l3_cache_per_thread;
-+ }
-+ }
-+
- case _SC_LEVEL3_CACHE_ASSOC:
-- return ecx ? ((ebx >> 22) & 0x3ff) + 1 : 0;
-- case _SC_LEVEL1_ICACHE_LINESIZE:
-- case _SC_LEVEL1_DCACHE_LINESIZE:
-- case _SC_LEVEL2_CACHE_LINESIZE:
-+ switch ((edx >> 12) & 0xf)
-+ {
-+ case 0:
-+ case 1:
-+ case 2:
-+ case 4:
-+ return (edx >> 12) & 0xf;
-+ case 6:
-+ return 8;
-+ case 8:
-+ return 16;
-+ case 10:
-+ return 32;
-+ case 11:
-+ return 48;
-+ case 12:
-+ return 64;
-+ case 13:
-+ return 96;
-+ case 14:
-+ return 128;
-+ case 15:
-+ return ((edx & 0x3ffc0000) << 1) / (edx & 0xff);
-+ default:
-+ return 0;
-+ }
-+
- case _SC_LEVEL3_CACHE_LINESIZE:
-- return ecx ? (ebx & 0xfff) + 1 : 0;
-- case _SC_LEVEL1_ICACHE_SIZE:
-- case _SC_LEVEL1_DCACHE_SIZE:
-- case _SC_LEVEL2_CACHE_SIZE:
-- case _SC_LEVEL3_CACHE_SIZE:
-- return ecx ? (((ebx >> 22) & 0x3ff) + 1) * ((ebx & 0xfff) + 1) * (ecx + 1): 0;
-+ return (edx & 0xf000) == 0 ? 0 : edx & 0xff;
-+
- default:
- __builtin_unreachable ();
- }
-@@ -604,11 +770,10 @@ get_common_cache_info (long int *shared_ptr, long int * shared_per_thread_ptr, u
- level. */
- threads = ((cpu_features->features[CPUID_INDEX_1].cpuid.ebx >> 16)
- & 0xff);
--
-- /* Get per-thread size of highest level cache. */
-- if (shared_per_thread > 0 && threads > 0)
-- shared_per_thread /= threads;
- }
-+ /* Get per-thread size of highest level cache. */
-+ if (shared_per_thread > 0 && threads > 0)
-+ shared_per_thread /= threads;
- }
-
- /* Account for non-inclusive L2 and L3 caches. */
-@@ -703,7 +868,6 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
- data = handle_amd (_SC_LEVEL1_DCACHE_SIZE);
- core = handle_amd (_SC_LEVEL2_CACHE_SIZE);
- shared = handle_amd (_SC_LEVEL3_CACHE_SIZE);
-- shared_per_thread = shared;
-
- level1_icache_size = handle_amd (_SC_LEVEL1_ICACHE_SIZE);
- level1_icache_linesize = handle_amd (_SC_LEVEL1_ICACHE_LINESIZE);
-@@ -716,13 +880,20 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
- level3_cache_size = shared;
- level3_cache_assoc = handle_amd (_SC_LEVEL3_CACHE_ASSOC);
- level3_cache_linesize = handle_amd (_SC_LEVEL3_CACHE_LINESIZE);
-+ level4_cache_size = handle_amd (_SC_LEVEL4_CACHE_SIZE);
-
- if (shared <= 0)
-- /* No shared L3 cache. All we have is the L2 cache. */
-- shared = core;
-+ {
-+ /* No shared L3 cache. All we have is the L2 cache. */
-+ shared = core;
-+ }
-+ else if (cpu_features->basic.family < 0x17)
-+ {
-+ /* Account for exclusive L2 and L3 caches. */
-+ shared += core;
-+ }
-
-- if (shared_per_thread <= 0)
-- shared_per_thread = shared;
-+ shared_per_thread = shared;
- }
-
- cpu_features->level1_icache_size = level1_icache_size;
-diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S
-index d98500a78a..4922cba657 100644
---- a/sysdeps/x86_64/memcpy.S
-+++ b/sysdeps/x86_64/memcpy.S
-@@ -1 +1 @@
--/* Implemented in memcpy.S. */
-+/* Implemented in memmove.S. */
-diff --git a/sysdeps/x86_64/memmove.S b/sysdeps/x86_64/memmove.S
-index f0b84e3b52..c3c08165e1 100644
---- a/sysdeps/x86_64/memmove.S
-+++ b/sysdeps/x86_64/memmove.S
-@@ -46,6 +46,9 @@ weak_alias (__mempcpy, mempcpy)
-
- #ifndef USE_MULTIARCH
- libc_hidden_builtin_def (memmove)
-+libc_hidden_builtin_def (__memmove_chk)
-+libc_hidden_builtin_def (__memcpy_chk)
-+libc_hidden_builtin_def (__mempcpy_chk)
- # if defined SHARED && IS_IN (libc)
- strong_alias (memmove, __memcpy)
- libc_hidden_ver (memmove, memcpy)
-diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
-index 7c99df36db..c6df24e8de 100644
---- a/sysdeps/x86_64/memset.S
-+++ b/sysdeps/x86_64/memset.S
-@@ -32,6 +32,7 @@
- #include "isa-default-impl.h"
-
- libc_hidden_builtin_def (memset)
-+libc_hidden_builtin_def (__memset_chk)
-
- #if IS_IN (libc)
- libc_hidden_def (__wmemset)
diff --git a/glibc/glibc-2.38-memalign_fix-1.patch b/glibc/glibc-2.38-memalign_fix-1.patch
deleted file mode 100644
index b04c21f3..00000000
--- a/glibc/glibc-2.38-memalign_fix-1.patch
+++ /dev/null
@@ -1,585 +0,0 @@
-Submitted By: Xi Ruoyao <xry111 at xry111.site>
-Date: 2023-08-13
-Initial Package Version: 2.38
-Upstream Status: Under review
-Origin: Upstream & Self
- - 1/3: https://sourceware.org/git/?p=glibc.git;a=patch;h=542b11058525
- - 2/3: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
- - 3/3: Trivial unused code removal
-Description: Fixes a regression causing posix_memalign()
- very slow in certain conditions to avoid
- breaking ffmpeg-based applications.
-
-From fc01478d06658ace8d57e5328c1e717275acfe84 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer(a)redhat.com>
-Date: Fri, 11 Aug 2023 11:18:17 +0200
-Subject: [PATCH 1/3] malloc: Enable merging of remainders in memalign (bug
- 30723)
-
-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(a)redhat.com>
-(cherry picked from commit 542b1105852568c3ebc712225ae78b8c8ba31a78)
----
- malloc/malloc.c | 197 +++++++++++++++++++++++++++++-------------------
- 1 file changed, 121 insertions(+), 76 deletions(-)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index e2f1a615a4..948f9759af 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -1086,6 +1086,11 @@ typedef struct malloc_chunk* mchunkptr;
-
- static void* _int_malloc(mstate, size_t);
- static void _int_free(mstate, mchunkptr, int);
-+static void _int_free_merge_chunk (mstate, mchunkptr, INTERNAL_SIZE_T);
-+static INTERNAL_SIZE_T _int_free_create_chunk (mstate,
-+ mchunkptr, INTERNAL_SIZE_T,
-+ mchunkptr, INTERNAL_SIZE_T);
-+static void _int_free_maybe_consolidate (mstate, INTERNAL_SIZE_T);
- static void* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
- INTERNAL_SIZE_T);
- static void* _int_memalign(mstate, size_t, size_t);
-@@ -4637,31 +4642,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- if (!have_lock)
- __libc_lock_lock (av->mutex);
-
-- nextchunk = chunk_at_offset(p, size);
--
-- /* Lightweight tests: check whether the block is already the
-- top block. */
-- if (__glibc_unlikely (p == av->top))
-- malloc_printerr ("double free or corruption (top)");
-- /* Or whether the next chunk is beyond the boundaries of the arena. */
-- if (__builtin_expect (contiguous (av)
-- && (char *) nextchunk
-- >= ((char *) av->top + chunksize(av->top)), 0))
-- malloc_printerr ("double free or corruption (out)");
-- /* Or whether the block is actually not marked used. */
-- if (__glibc_unlikely (!prev_inuse(nextchunk)))
-- malloc_printerr ("double free or corruption (!prev)");
--
-- nextsize = chunksize(nextchunk);
-- if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-- || __builtin_expect (nextsize >= av->system_mem, 0))
-- malloc_printerr ("free(): invalid next size (normal)");
-+ _int_free_merge_chunk (av, p, size);
-
-- free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-+ if (!have_lock)
-+ __libc_lock_unlock (av->mutex);
-+ }
-+ /*
-+ If the chunk was allocated via mmap, release via munmap().
-+ */
-+
-+ else {
-+ munmap_chunk (p);
-+ }
-+}
-+
-+/* Try to merge chunk P of SIZE bytes with its neighbors. Put the
-+ resulting chunk on the appropriate bin list. P must not be on a
-+ bin list yet, and it can be in use. */
-+static void
-+_int_free_merge_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size)
-+{
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+
-+ /* Lightweight tests: check whether the block is already the
-+ top block. */
-+ if (__glibc_unlikely (p == av->top))
-+ malloc_printerr ("double free or corruption (top)");
-+ /* Or whether the next chunk is beyond the boundaries of the arena. */
-+ if (__builtin_expect (contiguous (av)
-+ && (char *) nextchunk
-+ >= ((char *) av->top + chunksize(av->top)), 0))
-+ malloc_printerr ("double free or corruption (out)");
-+ /* Or whether the block is actually not marked used. */
-+ if (__glibc_unlikely (!prev_inuse(nextchunk)))
-+ malloc_printerr ("double free or corruption (!prev)");
-+
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
-+ || __builtin_expect (nextsize >= av->system_mem, 0))
-+ malloc_printerr ("free(): invalid next size (normal)");
-+
-+ free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
-
-- /* consolidate backward */
-- if (!prev_inuse(p)) {
-- prevsize = prev_size (p);
-+ /* Consolidate backward. */
-+ if (!prev_inuse(p))
-+ {
-+ INTERNAL_SIZE_T prevsize = prev_size (p);
- size += prevsize;
- p = chunk_at_offset(p, -((long) prevsize));
- if (__glibc_unlikely (chunksize(p) != prevsize))
-@@ -4669,9 +4695,25 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- unlink_chunk (av, p);
- }
-
-- if (nextchunk != av->top) {
-+ /* Write the chunk header, maybe after merging with the following chunk. */
-+ size = _int_free_create_chunk (av, p, size, nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, size);
-+}
-+
-+/* Create a chunk at P of SIZE bytes, with SIZE potentially increased
-+ to cover the immediately following chunk NEXTCHUNK of NEXTSIZE
-+ bytes (if NEXTCHUNK is unused). The chunk at P is not actually
-+ read and does not have to be initialized. After creation, it is
-+ placed on the appropriate bin list. The function returns the size
-+ of the new chunk. */
-+static INTERNAL_SIZE_T
-+_int_free_create_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size,
-+ mchunkptr nextchunk, INTERNAL_SIZE_T nextsize)
-+{
-+ if (nextchunk != av->top)
-+ {
- /* get and clear inuse bit */
-- nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
-+ bool nextinuse = inuse_bit_at_offset (nextchunk, nextsize);
-
- /* consolidate forward */
- if (!nextinuse) {
-@@ -4686,8 +4728,8 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- been given one chance to be used in malloc.
- */
-
-- bck = unsorted_chunks(av);
-- fwd = bck->fd;
-+ mchunkptr bck = unsorted_chunks (av);
-+ mchunkptr fwd = bck->fd;
- if (__glibc_unlikely (fwd->bk != bck))
- malloc_printerr ("free(): corrupted unsorted chunks");
- p->fd = fwd;
-@@ -4706,61 +4748,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- check_free_chunk(av, p);
- }
-
-- /*
-- If the chunk borders the current high end of memory,
-- consolidate into top
-- */
--
-- else {
-+ else
-+ {
-+ /* If the chunk borders the current high end of memory,
-+ consolidate into top. */
- size += nextsize;
- set_head(p, size | PREV_INUSE);
- av->top = p;
- check_chunk(av, p);
- }
-
-- /*
-- If freeing a large space, consolidate possibly-surrounding
-- chunks. Then, if the total unused topmost memory exceeds trim
-- threshold, ask malloc_trim to reduce top.
--
-- Unless max_fast is 0, we don't know if there are fastbins
-- bordering top, so we cannot tell for sure whether threshold
-- has been reached unless fastbins are consolidated. But we
-- don't want to consolidate on each free. As a compromise,
-- consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD
-- is reached.
-- */
-+ return size;
-+}
-
-- if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {
-+/* If freeing a large space, consolidate possibly-surrounding
-+ chunks. Then, if the total unused topmost memory exceeds trim
-+ threshold, ask malloc_trim to reduce top. */
-+static void
-+_int_free_maybe_consolidate (mstate av, INTERNAL_SIZE_T size)
-+{
-+ /* Unless max_fast is 0, we don't know if there are fastbins
-+ bordering top, so we cannot tell for sure whether threshold has
-+ been reached unless fastbins are consolidated. But we don't want
-+ to consolidate on each free. As a compromise, consolidation is
-+ performed if FASTBIN_CONSOLIDATION_THRESHOLD is reached. */
-+ if (size >= FASTBIN_CONSOLIDATION_THRESHOLD)
-+ {
- if (atomic_load_relaxed (&av->have_fastchunks))
- malloc_consolidate(av);
-
-- if (av == &main_arena) {
-+ if (av == &main_arena)
-+ {
- #ifndef MORECORE_CANNOT_TRIM
-- if ((unsigned long)(chunksize(av->top)) >=
-- (unsigned long)(mp_.trim_threshold))
-- systrim(mp_.top_pad, av);
-+ if (chunksize (av->top) >= mp_.trim_threshold)
-+ systrim (mp_.top_pad, av);
- #endif
-- } else {
-- /* Always try heap_trim(), even if the top chunk is not
-- large, because the corresponding heap might go away. */
-- heap_info *heap = heap_for_ptr(top(av));
-+ }
-+ else
-+ {
-+ /* Always try heap_trim, even if the top chunk is not large,
-+ because the corresponding heap might go away. */
-+ heap_info *heap = heap_for_ptr (top (av));
-
-- assert(heap->ar_ptr == av);
-- heap_trim(heap, mp_.top_pad);
-- }
-+ assert (heap->ar_ptr == av);
-+ heap_trim (heap, mp_.top_pad);
-+ }
- }
--
-- if (!have_lock)
-- __libc_lock_unlock (av->mutex);
-- }
-- /*
-- If the chunk was allocated via mmap, release via munmap().
-- */
--
-- else {
-- munmap_chunk (p);
-- }
- }
-
- /*
-@@ -5221,7 +5254,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- (av != &main_arena ? NON_MAIN_ARENA : 0));
- set_inuse_bit_at_offset (newp, newsize);
- set_head_size (p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
-- _int_free (av, p, 1);
-+ _int_free_merge_chunk (av, p, leadsize);
- p = newp;
-
- assert (newsize >= nb &&
-@@ -5232,15 +5265,27 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- if (!chunk_is_mmapped (p))
- {
- size = chunksize (p);
-- if ((unsigned long) (size) > (unsigned long) (nb + MINSIZE))
-+ mchunkptr nextchunk = chunk_at_offset(p, size);
-+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
-+ if (size > nb)
- {
- remainder_size = size - nb;
-- remainder = chunk_at_offset (p, nb);
-- set_head (remainder, remainder_size | PREV_INUSE |
-- (av != &main_arena ? NON_MAIN_ARENA : 0));
-- set_head_size (p, nb);
-- _int_free (av, remainder, 1);
-- }
-+ if (remainder_size >= MINSIZE
-+ || nextchunk == av->top
-+ || !inuse_bit_at_offset (nextchunk, nextsize))
-+ {
-+ /* We can only give back the tail if it is larger than
-+ MINSIZE, or if the following chunk is unused (top
-+ chunk or unused in-heap chunk). Otherwise we would
-+ create a chunk that is smaller than MINSIZE. */
-+ remainder = chunk_at_offset (p, nb);
-+ set_head_size (p, nb);
-+ remainder_size = _int_free_create_chunk (av, remainder,
-+ remainder_size,
-+ nextchunk, nextsize);
-+ _int_free_maybe_consolidate (av, remainder_size);
-+ }
-+ }
- }
-
- check_inuse_chunk (av, p);
---
-2.41.0
-
-From b37e836b7cc2dba672e1de1cc7e076ba1c712614 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer(a)redhat.com>
-Date: Fri, 11 Aug 2023 17:48:13 +0200
-Subject: [PATCH 2/3] malloc: Remove bin scanning from memalign (bug 30723)
-
-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.
-
-Link: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
----
- malloc/malloc.c | 127 ++--------------------------------------
- malloc/tst-memalign-2.c | 7 ++-
- 2 files changed, 10 insertions(+), 124 deletions(-)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 948f9759af..9c2cab7a59 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -5082,7 +5082,6 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- mchunkptr remainder; /* spare room at end to split off */
- unsigned long remainder_size; /* its size */
- INTERNAL_SIZE_T size;
-- mchunkptr victim;
-
- nb = checked_request2size (bytes);
- if (nb == 0)
-@@ -5101,129 +5100,13 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
- we don't find anything in those bins, the common malloc code will
- scan starting at 2x. */
-
-- /* This will be set if we found a candidate chunk. */
-- victim = NULL;
-+ /* Call malloc with worst case padding to hit alignment. */
-+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
-
-- /* Fast bins are singly-linked, hard to remove a chunk from the middle
-- and unlikely to meet our alignment requirements. We have not done
-- any experimentation with searching for aligned fastbins. */
-+ if (m == 0)
-+ return 0; /* propagate failure */
-
-- if (av != NULL)
-- {
-- int first_bin_index;
-- int first_largebin_index;
-- int last_bin_index;
--
-- if (in_smallbin_range (nb))
-- first_bin_index = smallbin_index (nb);
-- else
-- first_bin_index = largebin_index (nb);
--
-- if (in_smallbin_range (nb * 2))
-- last_bin_index = smallbin_index (nb * 2);
-- else
-- last_bin_index = largebin_index (nb * 2);
--
-- first_largebin_index = largebin_index (MIN_LARGE_SIZE);
--
-- int victim_index; /* its bin index */
--
-- for (victim_index = first_bin_index;
-- victim_index < last_bin_index;
-- victim_index ++)
-- {
-- victim = NULL;
--
-- if (victim_index < first_largebin_index)
-- {
-- /* Check small bins. Small bin chunks are doubly-linked despite
-- being the same size. */
--
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
-- while (fwd != bck)
-- {
-- if (chunk_ok_for_memalign (fwd, alignment, nb) > 0)
-- {
-- victim = fwd;
--
-- /* Unlink it */
-- victim->fd->bk = victim->bk;
-- victim->bk->fd = victim->fd;
-- break;
-- }
--
-- fwd = fwd->fd;
-- }
-- }
-- else
-- {
-- /* Check large bins. */
-- mchunkptr fwd; /* misc temp for linking */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr best = NULL;
-- size_t best_size = 0;
--
-- bck = bin_at (av, victim_index);
-- fwd = bck->fd;
--
-- while (fwd != bck)
-- {
-- int extra;
--
-- if (chunksize (fwd) < nb)
-- break;
-- extra = chunk_ok_for_memalign (fwd, alignment, nb);
-- if (extra > 0
-- && (extra <= best_size || best == NULL))
-- {
-- best = fwd;
-- best_size = extra;
-- }
--
-- fwd = fwd->fd;
-- }
-- victim = best;
--
-- if (victim != NULL)
-- {
-- unlink_chunk (av, victim);
-- break;
-- }
-- }
--
-- if (victim != NULL)
-- break;
-- }
-- }
--
-- /* Strategy: find a spot within that chunk that meets the alignment
-- request, and then possibly free the leading and trailing space.
-- This strategy is incredibly costly and can lead to external
-- fragmentation if header and footer chunks are unused. */
--
-- if (victim != NULL)
-- {
-- p = victim;
-- m = chunk2mem (p);
-- set_inuse (p);
-- if (av != &main_arena)
-- set_non_main_arena (p);
-- }
-- else
-- {
-- /* Call malloc with worst case padding to hit alignment. */
--
-- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
--
-- if (m == 0)
-- return 0; /* propagate failure */
--
-- p = mem2chunk (m);
-- }
-+ p = mem2chunk (m);
-
- if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
- {
-diff --git a/malloc/tst-memalign-2.c b/malloc/tst-memalign-2.c
-index f229283dbf..ecd6fa249e 100644
---- a/malloc/tst-memalign-2.c
-+++ b/malloc/tst-memalign-2.c
-@@ -86,7 +86,8 @@ do_test (void)
- TEST_VERIFY (tcache_allocs[i].ptr1 == tcache_allocs[i].ptr2);
- }
-
-- /* Test for non-head tcache hits. */
-+ /* Test for non-head tcache hits. This exercises the memalign
-+ scanning code to find matching allocations. */
- for (i = 0; i < array_length (ptr); ++ i)
- {
- if (i == 4)
-@@ -113,7 +114,9 @@ do_test (void)
- free (p);
- TEST_VERIFY (count > 0);
-
-- /* Large bins test. */
-+ /* Large bins test. This verifies that the over-allocated parts
-+ that memalign releases for future allocations can be reused by
-+ memalign itself at least in some cases. */
-
- for (i = 0; i < LN; ++ i)
- {
---
-2.41.0
-
-From 26973f7b09c33e67f6bcbc79371796c8dd334528 Mon Sep 17 00:00:00 2001
-From: Xi Ruoyao <xry111(a)xry111.site>
-Date: Mon, 14 Aug 2023 11:05:18 +0800
-Subject: [PATCH 3/3] malloc: Remove unused functions and variables
-
-Remove unused chunk_ok_for_memalign function and unused local variables
-in _int_free.
-
-Signed-off-by: Xi Ruoyao <xry111(a)xry111.site>
----
- malloc/malloc.c | 42 ------------------------------------------
- 1 file changed, 42 deletions(-)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 9c2cab7a59..d0bbbf3710 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -4488,12 +4488,6 @@ _int_free (mstate av, mchunkptr p, int have_lock)
- {
- INTERNAL_SIZE_T size; /* its size */
- mfastbinptr *fb; /* associated fastbin */
-- mchunkptr nextchunk; /* next contiguous chunk */
-- INTERNAL_SIZE_T nextsize; /* its size */
-- int nextinuse; /* true if nextchunk is used */
-- INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
-- mchunkptr bck; /* misc temp for linking */
-- mchunkptr fwd; /* misc temp for linking */
-
- size = chunksize (p);
-
-@@ -5032,42 +5026,6 @@ _int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
- ------------------------------ memalign ------------------------------
- */
-
--/* Returns 0 if the chunk is not and does not contain the requested
-- aligned sub-chunk, else returns the amount of "waste" from
-- trimming. NB is the *chunk* byte size, not the user byte
-- size. */
--static size_t
--chunk_ok_for_memalign (mchunkptr p, size_t alignment, size_t nb)
--{
-- void *m = chunk2mem (p);
-- INTERNAL_SIZE_T size = chunksize (p);
-- void *aligned_m = m;
--
-- if (__glibc_unlikely (misaligned_chunk (p)))
-- malloc_printerr ("_int_memalign(): unaligned chunk detected");
--
-- aligned_m = PTR_ALIGN_UP (m, alignment);
--
-- INTERNAL_SIZE_T front_extra = (intptr_t) aligned_m - (intptr_t) m;
--
-- /* We can't trim off the front as it's too small. */
-- if (front_extra > 0 && front_extra < MINSIZE)
-- return 0;
--
-- /* If it's a perfect fit, it's an exception to the return value rule
-- (we would return zero waste, which looks like "not usable"), so
-- handle it here by returning a small non-zero value instead. */
-- if (size == nb && front_extra == 0)
-- return 1;
--
-- /* If the block we need fits in the chunk, calculate total waste. */
-- if (size > nb + front_extra)
-- return size - nb;
--
-- /* Can't use this chunk. */
-- return 0;
--}
--
- /* BYTES is user requested bytes, not requested chunksize bytes. */
- static void *
- _int_memalign (mstate av, size_t alignment, size_t bytes)
---
-2.41.0
-
diff --git a/glibc/glibc-2.38-fhs-1.patch b/glibc/glibc-2.39-fhs-1.patch
similarity index 64%
rename from glibc/glibc-2.38-fhs-1.patch
rename to glibc/glibc-2.39-fhs-1.patch
index 4ac8d106..6e48c974 100644
--- a/glibc/glibc-2.38-fhs-1.patch
+++ b/glibc/glibc-2.39-fhs-1.patch
@@ -7,9 +7,10 @@ Description: This patch removes references to /var/db directory whic
of FHS and replaces them with more suitable directories in /var
hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
---- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100
-+++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100
-@@ -250,7 +250,7 @@
+diff -Nru glibc-2.39.orig/Makeconfig glibc-2.39/Makeconfig
+--- glibc-2.39.orig/Makeconfig 2024-02-11 09:36:11.769783145 +0000
++++ glibc-2.39/Makeconfig 2024-02-11 09:36:55.883504464 +0000
+@@ -262,7 +262,7 @@
# Directory for the database files and Makefile for nss_db.
ifndef vardbdir
@@ -18,9 +19,10 @@ Description: This patch removes references to /var/db directory whic
endif
inst_vardbdir = $(install_root)$(vardbdir)
---- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100
-+++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100
-@@ -112,11 +112,11 @@
+diff -Nru glibc-2.39.orig/nscd/nscd.h glibc-2.39/nscd/nscd.h
+--- glibc-2.39.orig/nscd/nscd.h 2024-02-11 09:36:11.939784638 +0000
++++ glibc-2.39/nscd/nscd.h 2024-02-11 09:36:55.883504464 +0000
+@@ -160,11 +160,11 @@
/* Paths of the file for the persistent storage. */
@@ -37,9 +39,10 @@ Description: This patch removes references to /var/db directory whic
/* Path used when not using persistent storage. */
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
---- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100
-+++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100
-@@ -22,7 +22,7 @@
+diff -Nru glibc-2.39.orig/nss/db-Makefile glibc-2.39/nss/db-Makefile
+--- glibc-2.39.orig/nss/db-Makefile 2024-02-11 09:36:11.939784638 +0000
++++ glibc-2.39/nss/db-Makefile 2024-02-11 09:36:55.883504464 +0000
+@@ -21,7 +21,7 @@
/etc/rpc /etc/services /etc/shadow /etc/gshadow \
/etc/netgroup)
@@ -48,8 +51,9 @@ Description: This patch removes references to /var/db directory whic
AWK = awk
MAKEDB = makedb --quiet
---- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100
-+++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100
+diff -Nru glibc-2.39.orig/sysdeps/generic/paths.h glibc-2.39/sysdeps/generic/paths.h
+--- glibc-2.39.orig/sysdeps/generic/paths.h 2024-02-11 09:36:11.993118441 +0000
++++ glibc-2.39/sysdeps/generic/paths.h 2024-02-11 09:36:55.883504464 +0000
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
@@ -59,8 +63,9 @@ Description: This patch removes references to /var/db directory whic
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
---- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100
-+++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100
+diff -Nru glibc-2.39.orig/sysdeps/unix/sysv/linux/paths.h glibc-2.39/sysdeps/unix/sysv/linux/paths.h
+--- glibc-2.39.orig/sysdeps/unix/sysv/linux/paths.h 2024-02-11 09:36:12.119786221 +0000
++++ glibc-2.39/sysdeps/unix/sysv/linux/paths.h 2024-02-11 09:36:55.886837827 +0000
@@ -68,7 +68,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
1
0
commit d985f99de8a7cf19415a466e941821234cf018b6
Author: Juergen Daubert <jue(a)crux.nu>
Date: Sun Feb 11 13:10:24 2024 +0100
binutils: updated to version 2.42
diff --git a/binutils/.footprint b/binutils/.footprint
index 290d95e5..da5d1aae 100644
--- a/binutils/.footprint
+++ b/binutils/.footprint
@@ -155,10 +155,11 @@ drwxr-xr-x root/root usr/lib/ldscripts/
-rw-r--r-- root/root usr/lib/ldscripts/elf_x86_64.xu
-rw-r--r-- root/root usr/lib/ldscripts/elf_x86_64.xw
-rw-r--r-- root/root usr/lib/ldscripts/elf_x86_64.xwe
--rwxr-xr-x root/root usr/lib/libbfd-2.41.so
+-rw-r--r-- root/root usr/lib/ldscripts/stamp (EMPTY)
+-rwxr-xr-x root/root usr/lib/libbfd-2.42.so
-rw-r--r-- root/root usr/lib/libbfd.a
-rwxr-xr-x root/root usr/lib/libbfd.la
-lrwxrwxrwx root/root usr/lib/libbfd.so -> libbfd-2.41.so
+lrwxrwxrwx root/root usr/lib/libbfd.so -> libbfd-2.42.so
-rw-r--r-- root/root usr/lib/libctf-nobfd.a
-rwxr-xr-x root/root usr/lib/libctf-nobfd.la
lrwxrwxrwx root/root usr/lib/libctf-nobfd.so -> libctf-nobfd.so.0.0.0
@@ -175,10 +176,10 @@ lrwxrwxrwx root/root usr/lib/libgprofng.so -> libgprofng.so.0.0.0
lrwxrwxrwx root/root usr/lib/libgprofng.so.0 -> libgprofng.so.0.0.0
-rwxr-xr-x root/root usr/lib/libgprofng.so.0.0.0
-rw-r--r-- root/root usr/lib/libiberty.a
--rwxr-xr-x root/root usr/lib/libopcodes-2.41.so
+-rwxr-xr-x root/root usr/lib/libopcodes-2.42.so
-rw-r--r-- root/root usr/lib/libopcodes.a
-rwxr-xr-x root/root usr/lib/libopcodes.la
-lrwxrwxrwx root/root usr/lib/libopcodes.so -> libopcodes-2.41.so
+lrwxrwxrwx root/root usr/lib/libopcodes.so -> libopcodes-2.42.so
-rw-r--r-- root/root usr/lib/libsframe.a
-rwxr-xr-x root/root usr/lib/libsframe.la
lrwxrwxrwx root/root usr/lib/libsframe.so -> libsframe.so.1.0.0
diff --git a/binutils/.signature b/binutils/.signature
index 8ca3f02e..9e17a776 100644
--- a/binutils/.signature
+++ b/binutils/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/core.pub
-RWRJc1FUaeVequ42wTBTciyMb6OC5RoKjQt8fvFat88Hl9rQA7XaIsaZCk1aOKuoeeiep3NcUEquyNd7PdmDkZYQPvsktUdvygQ=
-SHA256 (Pkgfile) = 15ebb385a81ba19a521b3af2fa26183e80ac40213f21c90146f06e7649e878a2
-SHA256 (.footprint) = ba30362c7b335dac6dbac042f125efb9b4dddb72e04562afe9cc0f1fa5f138d3
-SHA256 (binutils-2.41.tar.xz) = ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450
+RWRJc1FUaeVeqnJ3m68kcgeXFlutyeIi3eAPzQpMKBQMiyiax/vbRPpvNMpoMC5fomn/3GQsk44TvtdwCFfeR1j6AQiDZk9p/gA=
+SHA256 (Pkgfile) = 323c80878756d32cbf0deb0153c828452bc4042ed612f804dc360bb859a5e707
+SHA256 (.footprint) = e6a060f924cc21b5ee154c5b3f8110ebb207f65a5da48432d38c334fc2e03900
+SHA256 (binutils-2.42.tar.xz) = f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800
diff --git a/binutils/Pkgfile b/binutils/Pkgfile
index fe94207c..c02e607d 100644
--- a/binutils/Pkgfile
+++ b/binutils/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: flex zlib
name=binutils
-version=2.41
+version=2.42
release=1
source=(https://ftpmirror.gnu.org/gnu/$name/$name-$version.tar.xz)
1
0
commit 467f3833c1aaedb8cb31496119e57e72d0f1dbc1
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 12:51:55 2024 +0100
python3-elementpath: 4.2.0 -> 4.2.1
diff --git a/python3-elementpath/.footprint b/python3-elementpath/.footprint
index 4de270874..768fb1c0d 100644
--- a/python3-elementpath/.footprint
+++ b/python3-elementpath/.footprint
@@ -2,12 +2,12 @@ drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/python3.10/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/
-drwxr-xr-x root/root usr/lib/python3.10/site-packages/elementpath-4.2.0-py3.10.egg-info/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.0-py3.10.egg-info/PKG-INFO
--rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.0-py3.10.egg-info/SOURCES.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.0-py3.10.egg-info/dependency_links.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.0-py3.10.egg-info/requires.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.0-py3.10.egg-info/top_level.txt
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/elementpath-4.2.1-py3.10.egg-info/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.1-py3.10.egg-info/PKG-INFO
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.1-py3.10.egg-info/SOURCES.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.1-py3.10.egg-info/dependency_links.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.1-py3.10.egg-info/requires.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath-4.2.1-py3.10.egg-info/top_level.txt
drwxr-xr-x root/root usr/lib/python3.10/site-packages/elementpath/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/elementpath/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/elementpath/__pycache__/
diff --git a/python3-elementpath/.signature b/python3-elementpath/.signature
index f81782b06..cde8ecc3e 100644
--- a/python3-elementpath/.signature
+++ b/python3-elementpath/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF32/M43RwgxCunqakMqH0BlmFayBLZcRWoDs5EoyMn8A9olyRK5Y4tmGB1HNozEOiIXUb4jmfsr/2dCz6mNpsVQw=
-SHA256 (Pkgfile) = 12b5afe108bb14c069e27358f9ce2cc2106da7bf71bfe1c220374118e702e926
-SHA256 (.footprint) = bdbf783edfb4fc7a416267c2f72ee1700d41d829fc2b95c657fa47e63b4ecb52
-SHA256 (python3-elementpath-4.2.0.tar.gz) = e91e9a5cd61161d4aa713e198670a664f0f08313e2a35645fc575621f1cb76c8
+RWSagIOpLGJF323QKGTg95GrfL+2R9Kj2gLEbWHblOQiMglzONU4nXBg5qk54bvjEJI1Vm20HlTuUjoM/SKXbbO75OWYtAKIxwM=
+SHA256 (Pkgfile) = c55b18db10a26269397551f84163e68815aea92d1d70413eaeac50d100d4b432
+SHA256 (.footprint) = 3c83ef5d5206bef297725acb356cdc158d0e05f6066172a35300b8030589137f
+SHA256 (python3-elementpath-4.2.1.tar.gz) = 3094e39e7d733ec5071aab7e9ae336c81bf6de49c1090dd326e0407c0d17a82e
diff --git a/python3-elementpath/Pkgfile b/python3-elementpath/Pkgfile
index 17f498711..c4d00d933 100644
--- a/python3-elementpath/Pkgfile
+++ b/python3-elementpath/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: python3-setuptools
name=python3-elementpath
-version=4.2.0
+version=4.2.1
release=1
source=(https://github.com/sissaschool/elementpath/archive/v$version/$name-…
1
0
commit 58b73b79e442dc6a9760853acd1be9fd7f6e798f
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 12:51:36 2024 +0100
cargo-c: 0.9.29 -> 0.9.30
diff --git a/cargo-c/.signature b/cargo-c/.signature
index f11e304d5..ce0f32b3c 100644
--- a/cargo-c/.signature
+++ b/cargo-c/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF3+mkEcNnzx8w47tgYHooBY01pe+w0Zi7xsYK0ILgCUywM+VT1Z9v1/Jow/Yj9KjiUtYMuy2hnLlmP47ByMppwwE=
-SHA256 (Pkgfile) = 365ff651442a4c014aa5c07bf0170c2139effa9fa85d77089abd94b5349d5ab8
+RWSagIOpLGJF39cmpnlHoNgvBZqCaqtwZDb8BhtzIckTOODurPzrypETZ7rBCjFVSJOFaSWA8AeF8s0QN/8ELY5HQMqfw/AL/wk=
+SHA256 (Pkgfile) = 339f327a11f09ea02722d74dfd5f341cc118f54b00ff193a8bed220808e30173
SHA256 (.footprint) = 120f05ca57fb0dbc82b26d55fe14f3719e1bf43681a430bb813e7310a9a6a1e0
-SHA256 (cargo-c-0.9.29.tar.gz) = a52bb78cf6db00aa1caf06c679cfece27357c84367d8ac167d715e05e5f5a778
+SHA256 (cargo-c-0.9.30.tar.gz) = 174cfc3a69263c3e54b95e00c4bd61b13377f7f72d4bf60aa714fd9e7ed3849c
diff --git a/cargo-c/Pkgfile b/cargo-c/Pkgfile
index 24094fa66..d1bb0db09 100644
--- a/cargo-c/Pkgfile
+++ b/cargo-c/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: libgit2 rust
name=cargo-c
-version=0.9.29
+version=0.9.30
release=1
source=(https://github.com/lu-zero/cargo-c/archive/v$version/$name-$version…
1
0
commit 6c790ff5fb02f04cc079b54b252ea789fc3d937e
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 10:53:31 2024 +0100
babl: 0.1.106 -> 0.1.108
diff --git a/babl/.footprint b/babl/.footprint
index 72893d009..3185b73a0 100644
--- a/babl/.footprint
+++ b/babl/.footprint
@@ -20,6 +20,7 @@ drwxr-xr-x root/root usr/lib/babl-0.1/
-rwxr-xr-x root/root usr/lib/babl-0.1/double.so
-rwxr-xr-x root/root usr/lib/babl-0.1/fast-float.so
-rwxr-xr-x root/root usr/lib/babl-0.1/float.so
+-rwxr-xr-x root/root usr/lib/babl-0.1/formats.so
-rwxr-xr-x root/root usr/lib/babl-0.1/gegl-fixups.so
-rwxr-xr-x root/root usr/lib/babl-0.1/gggl-lies.so
-rwxr-xr-x root/root usr/lib/babl-0.1/gggl-table-lies.so
@@ -67,8 +68,8 @@ drwxr-xr-x root/root usr/lib/babl-0.1/
drwxr-xr-x root/root usr/lib/girepository-1.0/
-rw-r--r-- root/root usr/lib/girepository-1.0/Babl-0.1.typelib
lrwxrwxrwx root/root usr/lib/libbabl-0.1.so -> libbabl-0.1.so.0
-lrwxrwxrwx root/root usr/lib/libbabl-0.1.so.0 -> libbabl-0.1.so.0.205.1
--rwxr-xr-x root/root usr/lib/libbabl-0.1.so.0.205.1
+lrwxrwxrwx root/root usr/lib/libbabl-0.1.so.0 -> libbabl-0.1.so.0.207.1
+-rwxr-xr-x root/root usr/lib/libbabl-0.1.so.0.207.1
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/babl-0.1.pc
drwxr-xr-x root/root usr/share/
diff --git a/babl/.signature b/babl/.signature
index 30223c143..ed9ef7b60 100644
--- a/babl/.signature
+++ b/babl/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/Yy7uc6Kocdvj8GTjEziDa5rhxbqWpvCFZdr/po0gPO5nEg2hnB43d8+bGhcapODlmDXhKSDpiaN9Uctc130PAg=
-SHA256 (Pkgfile) = 925fa3939170b6f9ed4c8a698f59d10c25658cb8c7e14142431acea150a49ef8
-SHA256 (.footprint) = a97dbfdbafad135012fd36b6848c9b7181f48c91d919a6ce2fc2165e00f3f44b
-SHA256 (babl-0.1.106.tar.xz) = d325135d3304f088c134cc620013acf035de2e5d125a50a2d91054e7377c415f
+RWSE3ohX2g5d/eP5g/peRiDp3SqpHOqzkh6WRZhDgp5yqr5BS1Of4dRhTmnnfSgsqZzuo8etqoNgf3o5RVTT15/JyYN2Jw21UQI=
+SHA256 (Pkgfile) = 745d160e3c20c49724b46dd6c7ab6632b152b910b35c05e47796b2542efc9a1b
+SHA256 (.footprint) = 3f41709821a8699242ed76089cd63cb11df7364a512b8ae1c63b97412a9d5e57
+SHA256 (babl-0.1.108.tar.xz) = 26defe9deaab7ac4d0e076cab49c2a0d6ebd0df0c31fd209925a5f07edee1475
diff --git a/babl/Pkgfile b/babl/Pkgfile
index 91cf52a4d..e5ec8a3dc 100644
--- a/babl/Pkgfile
+++ b/babl/Pkgfile
@@ -5,7 +5,7 @@
# Optional: vala
name=babl
-version=0.1.106
+version=0.1.108
release=1
source=(https://download.gimp.org/pub/$name/${version%.*}/$name-$version.ta…
1
0
commit c36c5da6127fef89197c2d0e32f78fd18d1ce2b5
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 11:20:10 2024 +0100
rust: updated change-id
diff --git a/rust/.signature b/rust/.signature
index 259c46204..397a72acb 100644
--- a/rust/.signature
+++ b/rust/.signature
@@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/cX8hWno7+GpliRvDqVeWvkUgiIbHng9AoL2kncTrYcy0rBXQN3n3MW2WLMB+39h597BJlPubaEPv/8JE2dSbgg=
-SHA256 (Pkgfile) = c47eb328ed45167860dbe3cafb11c4e90f6a10ccd4b2931fd59a59c6271c30ed
+RWSE3ohX2g5d/S3mr+rJAqvqiKhPQtPaaGRR2gNB/IAnMwCafLp4RlFNPlavsfJW5pp6MPZiC4ii8UV03C8cLI9rM3fof11OvQU=
+SHA256 (Pkgfile) = 94c097fab261e09429db053d618b244773c2f675e2dd84196d544159c75b482d
SHA256 (.footprint) = c703bc0f5a8ba8396a0fd3accbe283fc46bb7a2ccd93ae2b2952b1d80b014f3b
SHA256 (rustc-1.76.0-src.tar.xz) = 805482b436442a6786d270cacbab8f00529e06141b27b7fb01909b97ce4f3464
SHA256 (rust-std-1.75.0-x86_64-unknown-linux-gnu.tar.xz) = 136b132199f7bbda2aa0bbff6d1e6ae7d5fca2994a2f2a432a5e99de224b6314
diff --git a/rust/Pkgfile b/rust/Pkgfile
index 198bfb4a4..d7187c110 100644
--- a/rust/Pkgfile
+++ b/rust/Pkgfile
@@ -70,7 +70,7 @@ build() {
patch -p1 -i $SRC/0004-compiler-Use-wasm-ld-for-wasm-targets.patch
cat <<- EOF > $SRC/config.toml
- change-id = 116881
+ change-id = 118703
[llvm]
ninja = true
1
0
commit faab9ad4e2cb2f99d5f23aa7fa71a4724076729c
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 10:51:08 2024 +0100
coin-or-clp: fixed finding cholmod.h
diff --git a/coin-or-clp/.signature b/coin-or-clp/.signature
index d349a5bca..08570ab20 100644
--- a/coin-or-clp/.signature
+++ b/coin-or-clp/.signature
@@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF3z7B8p+/DR9IAKYw2XSRlhM42Nyxf3nK6dUax9SxWTB6VW7wSpQe2sep8JdDicijqXH0KiJ4vcOC/0r/XwhDVgA=
-SHA256 (Pkgfile) = 52d77c2ff533e8c291aea6b181edfe03135318fb82763fe2a648f5c452e14a53
+RWSagIOpLGJF34ayeKdHuw4dTGvCym3mVLHdff38+80a58rknKiT6TnOosHXvej/wq7cr8E1eVyN4riC/DxavO/S+aJxm/Xgmg8=
+SHA256 (Pkgfile) = 80534a6118da37377b50f7498307a099877e730ce44f17984277d11fe0c557ac
SHA256 (.footprint) = 35b2940544ec893447b85a3e45f286e71a57726a3d406c41f66babffc237dd79
SHA256 (coin-or-clp-1.17.9.tar.gz) = b02109be54e2c9c6babc9480c242b2c3c7499368cfca8c0430f74782a694a49f
SHA256 (configure-exit.patch) = 79e506c72d85ab12fdbd1eb9866f5fc73b5adca8e58793e7d173239987d0808e
diff --git a/coin-or-clp/Pkgfile b/coin-or-clp/Pkgfile
index c3556c3b0..fadcae6ef 100644
--- a/coin-or-clp/Pkgfile
+++ b/coin-or-clp/Pkgfile
@@ -5,7 +5,7 @@
name=coin-or-clp
version=1.17.9
-release=1
+release=2
source=(https://github.com/coin-or/Clp/archive/releases/$version/$name-$ver…
configure-exit.patch
libtool.patch
@@ -24,11 +24,13 @@ build() {
--with-osi-incdir="/usr/include/coin/" \
--with-coinutils-lib="$(pkg-config --libs coinutils)" \
--with-coinutils-incdir="/usr/include/coin/" \
- --with-cholmod-lib='-lcholmod' --with-cholmod-incdir=/usr/include
+ --with-cholmod-lib='-lcholmod' \
+ --with-cholmod-incdir=/usr/include/suitesparse
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
make
- PKG_CONFIG_LIBDIR="$PKG"/usr/lib/pkgconfig/ \
- make DESTDIR="$PKG" install
+ make DESTDIR=$PKG install
rm -fr $PKG/usr/share/coin/doc
}
1
0
![](https://secure.gravatar.com/avatar/df8330968b6df8cd1c1942c5fb4b720c.jpg?s=120&d=mm&r=g)
ports/contrib (3.7): python3-netaddr: 0.10.1 -> 1.0.0; now depends on python3-build, python3-wheel, python3-installer
by crux@crux.nu 10 Feb '24
by crux@crux.nu 10 Feb '24
10 Feb '24
commit 68bee505f7aae732dfc6b8cf57ff872e12049bfa
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 09:54:06 2024 +0100
python3-netaddr: 0.10.1 -> 1.0.0; now depends on python3-build, python3-wheel, python3-installer
diff --git a/python3-netaddr/.footprint b/python3-netaddr/.footprint
index 542bec087..db0bf2cfc 100644
--- a/python3-netaddr/.footprint
+++ b/python3-netaddr/.footprint
@@ -4,88 +4,145 @@ drwxr-xr-x root/root usr/bin/
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/python3.10/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/
-drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/PKG-INFO
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/SOURCES.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/dependency_links.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/entry_points.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/requires.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-0.10.1-py3.10.egg-info/top_level.txt
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/AUTHORS
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/LICENSE
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/METADATA
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/RECORD
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/WHEEL
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/entry_points.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr-1.0.0.dist-info/top_level.txt
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/__init__.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/__init__.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/cli.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/cli.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/compat.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/compat.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/core.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/core.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/fbsocket.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/fbsocket.cpython-310.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/cli.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/compat.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/core.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/__pycache__/fbsocket.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/cli.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/compat.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/contrib/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/__init__.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/__init__.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/subnet_splitter.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/subnet_splitter.cpython-310.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/__pycache__/subnet_splitter.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/contrib/subnet_splitter.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/core.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/eui/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/__init__.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/__init__.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/ieee.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/ieee.cpython-310.pyc
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/iab.idx
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/iab.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/__pycache__/ieee.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/iab.idx
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/iab.txt
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/ieee.py
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/oui.idx
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/oui.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/oui.idx
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/eui/oui.txt
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/fbsocket.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/ip/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/__init__.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/__init__.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/glob.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/glob.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/iana.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/iana.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/nmap.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/nmap.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/rfc1924.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/rfc1924.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/sets.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/sets.cpython-310.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/glob.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/iana.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/nmap.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/rfc1924.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/__pycache__/sets.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/glob.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/iana.py
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/ipv4-address-space.xml
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/ipv6-address-space.xml
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/ipv6-unicast-address-assignments.xml
--rw-rw-r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/multicast-addresses.xml
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/ipv4-address-space.xml
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/ipv6-address-space.xml
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/ipv6-unicast-address-assignments.xml
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/multicast-addresses.xml
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/nmap.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/rfc1924.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/ip/sets.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/strategy/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/__init__.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/__init__.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/eui48.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/eui48.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/eui64.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/eui64.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/ipv4.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/ipv4.cpython-310.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/ipv6.cpython-310.opt-1.pyc
--rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/ipv6.cpython-310.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/eui48.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/eui64.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/ipv4.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/__pycache__/ipv6.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/eui48.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/eui64.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/ipv4.py
-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/strategy/ipv6.py
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/__init__.py (EMPTY)
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/__pycache__/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/__pycache__/test_netaddr.cpython-310.opt-2.pyc
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/core/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/core/__init__.py (EMPTY)
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/core/__pycache__/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/core/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/core/__pycache__/test_pubsub.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/core/test_pubsub.py
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/__init__.py (EMPTY)
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/__pycache__/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/__pycache__/test_eui.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/__pycache__/test_ieee_parsers.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/sample_iab.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/sample_oui.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/test_eui.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/eui/test_ieee_parsers.py
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__init__.py (EMPTY)
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_cidr_v4.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_cidr_v6.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_dns.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_categories.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_comparisons.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_globs.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_network_categories.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_ranges.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_rfc1924.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_sets.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_splitter.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_v4.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_v4_v6_conversions.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_ip_v6.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_network_ops.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_nmap.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_old_specs.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_platform_osx.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/__pycache__/test_socket_module_fallback.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_cidr_v4.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_cidr_v6.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_dns.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_categories.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_comparisons.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_globs.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_network_categories.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_ranges.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_rfc1924.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_sets.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_splitter.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_v4.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_v4_v6_conversions.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_ip_v6.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_network_ops.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_nmap.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_old_specs.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_platform_osx.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/ip/test_socket_module_fallback.py
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/__init__.py (EMPTY)
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/__pycache__/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/__pycache__/__init__.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/__pycache__/test_eui48_strategy.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/__pycache__/test_ipv4_strategy.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/__pycache__/test_ipv6_strategy.cpython-310.opt-2.pyc
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/test_eui48_strategy.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/test_ipv4_strategy.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/strategy/test_ipv6_strategy.py
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/netaddr/tests/test_netaddr.py
diff --git a/python3-netaddr/.signature b/python3-netaddr/.signature
index d05aba789..745f25318 100644
--- a/python3-netaddr/.signature
+++ b/python3-netaddr/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF39Yf6z4US65RiO3h8XzLVaP+6rIssoHtmUq7d7CSMGluqmuMAm/Am8/5R8YYgey1JuG2a1Ddg+YWP7+3/5fZYw0=
-SHA256 (Pkgfile) = ee7b297c53ab85cf0bfa93454097d89ecb4d9645378e82629dc9e8aa346e3b60
-SHA256 (.footprint) = b12ec7a8e0ae837e75b3be934f6d3910d1460b24eb6e9e0a054c4cae24777c5f
-SHA256 (python3-netaddr-0.10.1.tar.gz) = 0370c4668c4373a93fc75760205f0dcfb5aecfaa040cf5797c2dfc97d4e5ee29
+RWSagIOpLGJF3zBu0rdR8F24yeOCQHlRmTuDykbcBkWBfFMQufVbei3Wv/Ewlw6Y3vcbxL0ammR04Do8g/v2ioM4aye0TevCkAw=
+SHA256 (Pkgfile) = 6055da393411cc71b5a3dc53bfa256d8342a8db2a3260a5f00a552d5e356f797
+SHA256 (.footprint) = b20630fa30d05a091649addadfda15a28200bf716fb465933b9405a904588a50
+SHA256 (python3-netaddr-1.0.0.tar.gz) = 3548464575711c73e6e2d0aa7d1264087fa042fa2d1b89abd9d589586582a92a
diff --git a/python3-netaddr/Pkgfile b/python3-netaddr/Pkgfile
index 6e44b50c2..2113056b1 100644
--- a/python3-netaddr/Pkgfile
+++ b/python3-netaddr/Pkgfile
@@ -1,18 +1,16 @@
# Description: Pure Python network address representation and manipulation library
# URL: https://github.com/drkjam/netaddr
# Maintainer: Tim Biermann, tbier at posteo dot de
-# Depends on: python3-setuptools
+# Depends on: python3-build python3-wheel python3-installer
name=python3-netaddr
-version=0.10.1
+version=1.0.0
release=1
source=(https://github.com/drkjam/netaddr/archive/$version/$name-$version.t…
build() {
cd netaddr-$version
- /usr/bin/python3 setup.py build
- /usr/bin/python3 setup.py install --prefix=/usr \
- --root=$PKG \
- -O1 \
- --skip-build
+
+ /usr/bin/python3 -m build --wheel --skip-dependency-check --no-isolation
+ /usr/bin/python3 -m installer --compile-bytecode 2 --destdir=$PKG dist/*.whl
}
1
0
commit aed86aeb118dfd048c0618bcb498feb66da45bbd
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Feb 10 09:52:21 2024 +0100
sip: 6.8.2 -> 6.8.3
diff --git a/sip/.footprint b/sip/.footprint
index 643677033..a16807dfa 100644
--- a/sip/.footprint
+++ b/sip/.footprint
@@ -9,13 +9,13 @@ drwxr-xr-x root/root usr/bin/
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/python3.10/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/
-drwxr-xr-x root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/
--rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/PKG-INFO
--rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/SOURCES.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/dependency_links.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/entry_points.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/requires.txt
--rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.2-py3.10.egg-info/top_level.txt
+drwxr-xr-x root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/PKG-INFO
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/SOURCES.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/dependency_links.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/entry_points.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/requires.txt
+-rw-r--r-- root/root usr/lib/python3.10/site-packages/sip-6.8.3-py3.10.egg-info/top_level.txt
drwxr-xr-x root/root usr/lib/python3.10/site-packages/sipbuild/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/sipbuild/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/sipbuild/__pycache__/
diff --git a/sip/.signature b/sip/.signature
index 5b8597085..a837f07d1 100644
--- a/sip/.signature
+++ b/sip/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF38DhKjJ+PVMhaf9IO43so7wDu/rgWoMnmDRD0S9pzuKC3cxgxcvmd74rrEIzU8GJQq8UsUpkRyhjPPLIVkx2Bws=
-SHA256 (Pkgfile) = 4560bb616b83e68b07413b93600a717aa7e393e086f9312c9caa298a5eb53c55
-SHA256 (.footprint) = cf311b84bef3bdb1ba140ff1c267d5831b500bf7f531bc58a3aca6e6744a64d6
-SHA256 (sip-6.8.2.tar.gz) = 2e65a423037422ccfde095c257703a8ff45cc1c89bdaa294d7819bc836c87639
+RWSagIOpLGJF31vvyPXXfYVEuwP0Q6RomOn4PvPmBJj/ZJaKz8OVBwaBt4XekzjiP7AKwqA/gF4HtuKr/Qaczxdn3tlsVKRETQY=
+SHA256 (Pkgfile) = fcbcf7332be99279a235809100badfc5db1139de36718a805878220952a47763
+SHA256 (.footprint) = 703b25d43043f9dec61255d61e39559ed8c7fbf4f3e042f2371a49309c5692c0
+SHA256 (sip-6.8.3.tar.gz) = 888547b018bb24c36aded519e93d3e513d4c6aa0ba55b7cc1affbd45cf10762c
diff --git a/sip/Pkgfile b/sip/Pkgfile
index e9e3f2baf..9044bb6f3 100644
--- a/sip/Pkgfile
+++ b/sip/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: python3-packaging python3-ply python3-toml python3-tomli
name=sip
-version=6.8.2
+version=6.8.3
release=1
source=(https://pypi.python.org/packages/source/s/sip/sip-$version.tar.gz)
1
0