]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
5 months agohurd: Mark more memory-hungry tests as unsupported
Samuel Thibault [Sun, 12 Jan 2025 15:05:58 +0000 (16:05 +0100)] 
hurd: Mark more memory-hungry tests as unsupported

until RLIMIT_AS support gets commited in gnumach.

5 months agosocket/tst-cmsghdr: Fix alignment of cmsghdr
Samuel Thibault [Sun, 12 Jan 2025 14:57:26 +0000 (15:57 +0100)] 
socket/tst-cmsghdr: Fix alignment of cmsghdr

The computation was correct on Linux only by luck because the cmsghdr size
is already aligned there.

5 months agoelf: make tst-tls_tp_offset compare &thread_var to THREAD_SELF
Samuel Thibault [Sat, 11 Jan 2025 21:53:34 +0000 (22:53 +0100)] 
elf: make tst-tls_tp_offset compare &thread_var to THREAD_SELF

rather than pthread_self (), which in htl is not a pointer into dtv, but an
index.

5 months agohurd: Mark more memory-hungry tests as unsupported
Samuel Thibault [Sun, 12 Jan 2025 00:03:04 +0000 (01:03 +0100)] 
hurd: Mark more memory-hungry tests as unsupported

until RLIMIT_AS support gets commited in gnumach.

5 months agohurd: Mark tst-tls-allocation-failure-static-patched as supported
Samuel Thibault [Sat, 11 Jan 2025 23:11:15 +0000 (00:11 +0100)] 
hurd: Mark tst-tls-allocation-failure-static-patched as supported

The failure was not due to RLIMIT_AS but unsupported intentional early
abort.

5 months agohurd: Cope with signals sent to ourself early
Samuel Thibault [Sat, 11 Jan 2025 23:09:44 +0000 (00:09 +0100)] 
hurd: Cope with signals sent to ourself early

Typically when aborting during initialization, before signals are set
up.

5 months agox86-64: Cast __rseq_offset to long long int [BZ #32543]
H.J. Lu [Sat, 11 Jan 2025 14:57:02 +0000 (22:57 +0800)] 
x86-64: Cast __rseq_offset to long long int [BZ #32543]

commit 494d65129ed5ae1154b75cc189bbdde5e9ecf1df
Author: Michael Jeanson <mjeanson@efficios.com>
Date:   Thu Aug 1 10:35:34 2024 -0400

    nptl: Introduce <rseq-access.h> for RSEQ_* accessors

added things like

       asm volatile ("movl %%fs:%P1(%q2),%0"                                  \
                     : "=r" (__value)                                         \
                     : "i" (offsetof (struct rseq_area, member)),             \
                       "r" (__rseq_offset));       \

But this doesn't work for x32 when __rseq_offset is negative since the
address is computed as

FS + 32-bit to 64-bit zero extension of __rseq_offset
+ offsetof (struct rseq_area, member)

Cast __rseq_offset to long long int

                       "r" ((long long int) __rseq_offset));       \

to sign-extend 32-bit __rseq_offset to 64-bit.  This is a no-op for x86-64
since x86-64 __rseq_offset is 64-bit.  This fixes BZ #32543.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agohurd: Mark more memory-hungry tests as unsupported
Samuel Thibault [Fri, 10 Jan 2025 19:08:33 +0000 (20:08 +0100)] 
hurd: Mark more memory-hungry tests as unsupported

until RLIMIT_AS support gets commited in gnumach.

5 months agoLinux: Update internal copy of '<sys/rseq.h>'
Michael Jeanson [Thu, 1 Aug 2024 15:04:22 +0000 (11:04 -0400)] 
Linux: Update internal copy of '<sys/rseq.h>'

Sync the internal copy of '<sys/rseq.h>' with the latest Linux kernel
'include/uapi/linux/rseq.h'.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agonptl: Remove the rseq area from 'struct pthread'
Michael Jeanson [Thu, 1 Aug 2024 18:29:10 +0000 (14:29 -0400)] 
nptl: Remove the rseq area from 'struct pthread'

The rseq extensible ABI implementation moved the rseq area to the 'extra
TLS' block, remove the unused 'rseq_area' member of 'struct pthread'.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agonptl: Move the rseq area to the 'extra TLS' block
Michael Jeanson [Wed, 10 Jul 2024 19:48:49 +0000 (15:48 -0400)] 
nptl: Move the rseq area to the 'extra TLS' block

Move the rseq area to the newly added 'extra TLS' block, this is the
last step in adding support for the rseq extended ABI. The size of the
rseq area is now dynamic and depends on the rseq features reported by
the kernel through the elf auxiliary vector. This will allow
applications to use rseq features past the 32 bytes of the original rseq
ABI as they become available in future kernels.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agonptl: Introduce <rseq-access.h> for RSEQ_* accessors
Michael Jeanson [Thu, 1 Aug 2024 14:35:34 +0000 (10:35 -0400)] 
nptl: Introduce <rseq-access.h> for RSEQ_* accessors

In preparation to move the rseq area to the 'extra TLS' block, we need
accessors based on the thread pointer and the rseq offset. The ONCE
variant of the accessors ensures single-copy atomicity for loads and
stores which is required for all fields once the registration is active.

A separate header is required to allow including <atomic.h> which
results in an include loop when added to <tcb-access.h>.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agonptl: add rtld_hidden_proto to __rseq_size and __rseq_offset
Michael Jeanson [Wed, 20 Nov 2024 22:28:07 +0000 (22:28 +0000)] 
nptl: add rtld_hidden_proto to __rseq_size and __rseq_offset

This allows accessing the internal aliases of __rseq_size and
__rseq_offset from ld.so without ifdefs and avoids dynamic symbol
binding at run time for both variables.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agoAdd Linux 'extra TLS'
Michael Jeanson [Thu, 1 Aug 2024 15:10:49 +0000 (11:10 -0400)] 
Add Linux 'extra TLS'

Add the Linux implementation of 'extra TLS' which will allocate space
for the rseq area at the end of the TLS blocks in allocation order.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agoAdd generic 'extra TLS'
Michael Jeanson [Wed, 10 Jul 2024 19:48:11 +0000 (15:48 -0400)] 
Add generic 'extra TLS'

Add the logic to append an 'extra TLS' block in the TLS block allocator
with a generic stub implementation. The duplicated code in
'csu/libc-tls.c' and 'elf/dl-tls.c' is to handle both statically linked
applications and the ELF dynamic loader.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agonptl: Add rseq auxvals
Michael Jeanson [Wed, 10 Jul 2024 19:37:28 +0000 (15:37 -0400)] 
nptl: Add rseq auxvals

Get the rseq feature size and alignment requirement from the auxiliary
vector for use inside the dynamic loader. Use '__rseq_size' directly to
store the feature size. If the main thread registration fails or is
disabled by tunable, reset the value to 0.

This will be used in the TLS block allocator to compute the size and
alignment of the rseq area block for the extended ABI support.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agoAdd missing include guards to <dl-tls.h>
Florian Weimer [Fri, 10 Jan 2025 16:58:58 +0000 (17:58 +0100)] 
Add missing include guards to <dl-tls.h>

Some architecture-specific variants lack header inclusion guards.
Add them for consistency with the generic version.

5 months agomalloc: obscure calloc use in tst-calloc
Sam James [Fri, 10 Jan 2025 03:03:47 +0000 (03:03 +0000)] 
malloc: obscure calloc use in tst-calloc

Similar to a9944a52c967ce76a5894c30d0274b824df43c7a and
f9493a15ea9cfb63a815c00c23142369ec09d8ce, we need to hide calloc use from
the compiler to accommodate GCC's r15-6566-g804e9d55d9e54c change.

First, include tst-malloc-aux.h, but then use `volatile` variables
for size.

The test passes without the tst-malloc-aux.h change but IMO we want
it there for consistency and to avoid future problems (possibly silent).

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
5 months agoconfigure: Clear libc_cv_cc_wimplicit_fallthrough if not supported
H.J. Lu [Thu, 9 Jan 2025 23:09:16 +0000 (07:09 +0800)] 
configure: Clear libc_cv_cc_wimplicit_fallthrough if not supported

Clear libc_cv_cc_wimplicit_fallthrough if -Wimplicit-fallthrough isn't
supported.  Tested with GCC 6.4.1 on x86-64.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agoelf: Always define TLS_TP_OFFSET
Florian Weimer [Thu, 9 Jan 2025 18:30:44 +0000 (19:30 +0100)] 
elf: Always define TLS_TP_OFFSET

This will be needed to compute __rseq_offset outside of the TLS
relocation machinery.

Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
5 months agox86: Add missing #include <features.h> to <thread_pointer.h>
Florian Weimer [Thu, 9 Jan 2025 18:30:41 +0000 (19:30 +0100)] 
x86: Add missing #include <features.h> to <thread_pointer.h>

It is required for __GNUC_PREREQ.

Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
5 months agoMove <thread_pointer.h> to kernel-independent sysdeps directories
Florian Weimer [Thu, 9 Jan 2025 18:30:16 +0000 (19:30 +0100)] 
Move <thread_pointer.h> to kernel-independent sysdeps directories

Hurd is expected to use the same thread ABI as Linux.

Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
5 months agomath: Fix acosf when building with gcc <= 11
Adhemerval Zanella [Thu, 2 Jan 2025 13:54:11 +0000 (10:54 -0300)] 
math: Fix acosf when building with gcc <= 11

GCC <= 11 wrongly assumes the rounding is to nearest and performs a
constant folding where it should evaluate since the result is not
exact [1].

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57245

5 months agotests: Verify inheritance of cpu affinity
Siddhesh Poyarekar [Mon, 16 Dec 2024 13:14:09 +0000 (08:14 -0500)] 
tests: Verify inheritance of cpu affinity

Add a couple of tests to verify that CPU affinity set using
sched_setaffinity and pthread_setaffinity_np are inherited by a child
process and child thread.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
5 months agos390x: Regenerated ULPs
Stefan Liebler [Thu, 9 Jan 2025 09:02:21 +0000 (10:02 +0100)] 
s390x: Regenerated ULPs

ULPs update needed if build with gcc 11.5 or 10.5.

5 months agoi686: Regenerate multiarch ulps
H.J. Lu [Wed, 8 Jan 2025 23:00:18 +0000 (07:00 +0800)] 
i686: Regenerate multiarch ulps

Regenerate i686 multiarch ulps on Intel Core i7-1195G7 compiled with
-O2 -march=i686 using GCC 14.2.1.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
5 months agoRevert "configure: default to --prefix=/usr on GNU/Linux"
DJ Delorie [Wed, 8 Jan 2025 21:55:05 +0000 (16:55 -0500)] 
Revert "configure: default to --prefix=/usr on GNU/Linux"

This reverts commit 81439a116cf48583127ddf1f09809440aa40969a.

5 months agoriscv: Update nofpu libm test ulps
Darius Rad [Wed, 8 Jan 2025 20:03:56 +0000 (15:03 -0500)] 
riscv: Update nofpu libm test ulps

Fixes math test failures.

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoelf: Minimize library dependencies of tst-nolink-libc.c
Florian Weimer [Wed, 8 Jan 2025 15:55:31 +0000 (16:55 +0100)] 
elf: Minimize library dependencies of tst-nolink-libc.c

On 32-bit Arm, -fasynchronous-unwind-tables creates a reference
to the symbol __aeabi_unwind_cpp_pr0.  Compile the tests without
this flag even if it is passed as part of CC, to avoid linker
failures.

5 months agoinclude/string.h: Also redirect calls if not inlined in libpthread
Samuel Thibault [Tue, 7 Jan 2025 01:36:55 +0000 (02:36 +0100)] 
include/string.h: Also redirect calls if not inlined in libpthread

htl's pt-alloc.c calls __mempcpy, which is #defined to
__builtin_mempcpy, but which does not happen to get inlined (the size is
dynamic), and then gcc emits a reference to mempcpy, thus violating
symbol exposition standard. We thus also have to redirect such
references to __mempcpy too.

5 months agoor1k: Update fpu libm-test-ulps
Stafford Horne [Tue, 7 Jan 2025 16:13:26 +0000 (16:13 +0000)] 
or1k: Update fpu libm-test-ulps

5 months agomath: update powerpc ulps (this time LE)
Andreas K. Hüttel [Tue, 7 Jan 2025 14:58:45 +0000 (15:58 +0100)] 
math: update powerpc ulps (this time LE)

Linux bogsucker 6.1.55-gentoo-dist-hardened #1 SMP Sun Oct  1 18:03:02 UTC 2023 ppc64le POWER9 (architected), altivec supported CHRP IBM pSeries (emulated by qemu) GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoelf: Second ld.so relocation only if libc.so has been loaded
Florian Weimer [Tue, 7 Jan 2025 08:18:07 +0000 (09:18 +0100)] 
elf: Second ld.so relocation only if libc.so has been loaded

Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf:
rtld_multiple_ref is always true”) removed some code that happened
to enable compatibility with programs that do not link against
libc.so.  Such programs cannot call dlopen or any dynamic linker
functions (except __tls_get_addr), so this is not really useful.
Still ld.so should not crash with a null-pointer dereference
or undefined symbol reference in these cases.

In the main relocation loop, call _dl_relocate_object unconditionally
because it already checks if the object has been relocated.

If libc.so was loaded, self-relocate ld.so against it and call
__rtld_mutex_init and __rtld_malloc_init_real to activate the full
implementations.  Those are available only if libc.so is there,
so skip these initialization steps if libc.so is absent.  Without
libc.so, the global scope can be completely empty.  This can cause
ld.so self-relocation to fail because if it uses symbol-based
relocations, which is why the second ld.so self-relocation is not
performed if libc.so is missing.

The previous concern regarding GOT updates through self-relocation
no longer applies because function pointers are updated
explicitly through __rtld_mutex_init and __rtld_malloc_init_real,
and not through relocation.  However, the second ld.so self-relocation
is still delayed, in case there are other symbols being used.

Fixes commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf:
rtld_multiple_ref is always true”).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
5 months agoRevert "x86_64: Remove unused padding from tcbhead_t"
Florian Weimer [Tue, 7 Jan 2025 07:34:13 +0000 (08:34 +0100)] 
Revert "x86_64: Remove unused padding from tcbhead_t"

This reverts commit 30d3fd7f4f4bc8f767d73ad4e4b005c1bd234310.

The padding is required by Chromium's MaybeUpdateGlibcTidCache
in sandbox/linux/services/namespace_sandbox.cc.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
5 months agoRevert "nptl: More useful padding in struct pthread"
Florian Weimer [Tue, 7 Jan 2025 07:34:13 +0000 (08:34 +0100)] 
Revert "nptl: More useful padding in struct pthread"

This reverts commit 7c22dcda27743658b6b8ea479283b384ad56bd5a.

The padding is required by Chromium's MaybeUpdateGlibcTidCache
in sandbox/linux/services/namespace_sandbox.cc.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
5 months agotst-xdirent: Fix allocating dirent for readdir_r call
Samuel Thibault [Tue, 7 Jan 2025 00:56:41 +0000 (01:56 +0100)] 
tst-xdirent: Fix allocating dirent for readdir_r call

As documented in the glibc manual, “Some systems don’t define the d_name
element sufficiently long”, and it provides an example of using a union to
properly allocate the storage under the dirent.

5 months agohurd: Accept null arguments for utimensat pathname
Samuel Thibault [Tue, 7 Jan 2025 00:36:43 +0000 (01:36 +0100)] 
hurd: Accept null arguments for utimensat pathname

This follows Linux' behavior, making it a replacement for the futimens
interface.

5 months agomach: Make clock_nanosleep also check tv_sec
Samuel Thibault [Tue, 7 Jan 2025 00:24:21 +0000 (01:24 +0100)] 
mach: Make clock_nanosleep also check tv_sec

5 months agohtl: Fix making pthread_join check timeout value
Samuel Thibault [Tue, 7 Jan 2025 00:02:20 +0000 (01:02 +0100)] 
htl: Fix making pthread_join check timeout value

5 months agoi386: Update libm-test-ulps
Adhemerval Zanella [Mon, 6 Jan 2025 19:04:04 +0000 (16:04 -0300)] 
i386: Update libm-test-ulps

gcc version 14.2.1 targeting '-m32 -march=i586'.

5 months agonptl: Add <thread_pointer.h> for C-SKY
Michael Jeanson [Wed, 31 Jul 2024 21:51:16 +0000 (17:51 -0400)] 
nptl: Add <thread_pointer.h> for C-SKY

This will be required by the rseq extensible ABI implementation on all
Linux architectures exposing the '__rseq_size' and '__rseq_offset'
symbols to set the initial value of the 'cpu_id' field which can be used
by applications to test if rseq is available and registered. As long as
the symbols are exposed it is valid for an application to perform this
test even if rseq is not yet implemented in libc for this architecture.

Compile tested with build-many-glibcs.py but I don't have access to any
hardware to run the tests.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agonptl: Add <thread_pointer.h> for microblaze
Michael Jeanson [Wed, 31 Jul 2024 21:34:54 +0000 (17:34 -0400)] 
nptl: Add <thread_pointer.h> for microblaze

This will be required by the rseq extensible ABI implementation on all
Linux architectures exposing the '__rseq_size' and '__rseq_offset'
symbols to set the initial value of the 'cpu_id' field which can be used
by applications to test if rseq is available and registered. As long as
the symbols are exposed it is valid for an application to perform this
test even if rseq is not yet implemented in libc for this architecture.

Compile tested with build-many-glibcs.py but I don't have access to any
hardware to run the tests.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
5 months agomath: update i686 multiarch ulps
Andreas K. Hüttel [Mon, 6 Jan 2025 18:24:01 +0000 (19:24 +0100)] 
math: update i686 multiarch ulps

Linux waikiki 6.6.53-gentoo #1 SMP Wed Oct  2 13:21:27 CEST 2024 x86_64 AMD EPYC 7532 32-Core Processor AuthenticAMD GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agohurd: Fix shutdown() errno on non-sock
Samuel Thibault [Mon, 6 Jan 2025 17:03:10 +0000 (18:03 +0100)] 
hurd: Fix shutdown() errno on non-sock

5 months agomath: update mips64 ulps
Andreas K. Hüttel [Mon, 6 Jan 2025 11:31:52 +0000 (12:31 +0100)] 
math: update mips64 ulps

Linux matoro-mipsdev 6.12.0-gentoo-mips #2 SMP Tue Nov 19 15:34:04 EST 2024 mips64 Cavium Octeon II V0.10 EBB6800 (CN6880p2.2-1200-AAP) GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoLoongArch: Regenerate preconfigure. [bug 32521]
mengqinggang [Fri, 3 Jan 2025 07:49:43 +0000 (15:49 +0800)] 
LoongArch: Regenerate preconfigure. [bug 32521]

Add "mtls_descriptor=desc" to preconfigure.ac and regenerate preconfigure.
Fix failure: elf/tst-gnu2-tls2.

Reported-by: Joseph S. Myers <josmyers@redhat.com>
Reported-by: Andreas K. Huettel <dilfridge@gentoo.org>
5 months agoor1k: Update nofpu libm-test-ulps
Stafford Horne [Mon, 6 Jan 2025 00:29:37 +0000 (00:29 +0000)] 
or1k: Update nofpu libm-test-ulps

Updates tolerances due to change to use CORE-MATH

5 months agomath: update alpha ulps
Andreas K. Hüttel [Sun, 5 Jan 2025 19:02:53 +0000 (20:02 +0100)] 
math: update alpha ulps

Linux matoro-alphadev 6.12.3-gentoo-alpha #1 Sun Dec  8 04:39:11 EST 2024 alpha EV68CB Titan GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoloongarch: Drop __GI_XXX for strcpy/stpcpy IFUNC implementations
H.J. Lu [Fri, 3 Jan 2025 21:53:19 +0000 (05:53 +0800)] 
loongarch: Drop __GI_XXX for strcpy/stpcpy IFUNC implementations

There is no need for __GI_XXX symbols, like __GI___strcpy_aligned since
__strcpy_aligned is used directly.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agohppa: Update libm-test-ulps
John David Anglin [Sat, 4 Jan 2025 15:39:35 +0000 (10:39 -0500)] 
hppa: Update libm-test-ulps

Signed-off-by: John David Anglin <dave.anglin@bell.net>
5 months agomath: update loongarch64 ulps
Andreas K. Hüttel [Sat, 4 Jan 2025 13:57:31 +0000 (14:57 +0100)] 
math: update loongarch64 ulps

Linux matoro-loongdev 6.12.0-gentoo-loongarch64 #1 SMP PREEMPT Fri Nov 22 00:38:46 EST 2024 loongarch64 GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoRegenerate libc.pot
Andreas K. Hüttel [Sat, 4 Jan 2025 10:05:03 +0000 (11:05 +0100)] 
Regenerate libc.pot

Only changes to line numbers

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoloongarch: Provide stpcpy in stpcpy-aligned.S for rtld [BZ #32512]
H.J. Lu [Fri, 3 Jan 2025 21:43:21 +0000 (05:43 +0800)] 
loongarch: Provide stpcpy in stpcpy-aligned.S for rtld [BZ #32512]

When stpcpy-aligned.S is used in rtld, provide stpcpy as a weak alias of
__stpcpy.  This fixes BZ #32512.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
5 months agoAArch64: Improve codegen in SVE expm1f and users
Luna Lamb [Fri, 3 Jan 2025 20:15:17 +0000 (20:15 +0000)] 
AArch64: Improve codegen in SVE expm1f and users

Use unpredicated muls, use absolute compare and improve memory access.
Expm1f, sinhf and tanhf show 7%, 5% and 1% improvement in throughput
microbenchmark on Neoverse V1.

5 months agoAArch64: Add vector tanpi routines
Joe Ramsay [Fri, 3 Jan 2025 20:13:51 +0000 (20:13 +0000)] 
AArch64: Add vector tanpi routines

Vector variant of the new C23 tanpi. New tests pass on AArch64.

5 months agoAArch64: Add vector cospi routines
Joe Ramsay [Fri, 3 Jan 2025 20:12:10 +0000 (20:12 +0000)] 
AArch64: Add vector cospi routines

Vector variant of the new C23 cospi. New tests pass on AArch64.

5 months agoAArch64: Add vector sinpi to libmvec
Joe Ramsay [Fri, 3 Jan 2025 20:07:51 +0000 (20:07 +0000)] 
AArch64: Add vector sinpi to libmvec

Vector variant of the new C23 sinpi. New tests pass on AArch64.

5 months agomath: Remove no-mathvec flag
Joe Ramsay [Fri, 3 Jan 2025 19:13:36 +0000 (19:13 +0000)] 
math: Remove no-mathvec flag

More routines are to follow, some of which hit many failures in the
current testsuite due to wrong sign of zero (mathvec routines are not
required to get this right). Instead of disabling a large number of
tests, change the failure condition such that, for vector routines,
tests pass as long as computed == expected == 0.0, regardless of sign.

Affected tests (vector tests for expm1, log1p, sin, tan and tanh) all
still pass.

5 months agoAArch64: Improve codegen for SVE log1pf users
Yat Long Poon [Fri, 3 Jan 2025 19:09:05 +0000 (19:09 +0000)] 
AArch64: Improve codegen for SVE log1pf users

Reduce memory access by using lanewise MLA and reduce number of MOVPRFXs.
Move log1pf implementation to inline helper function.
Speedup on Neoverse V1 for log1pf (10%), acoshf (-1%), atanhf (2%), asinhf (2%).

5 months agoAArch64: Improve codegen for SVE logs
Yat Long Poon [Fri, 3 Jan 2025 19:07:30 +0000 (19:07 +0000)] 
AArch64: Improve codegen for SVE logs

Reduce memory access by using lanewise MLA and moving constants to struct
and reduce number of MOVPRFXs.
Update maximum ULP error for double log_sve from 1 to 2.
Speedup on Neoverse V1 for log (3%), log2 (5%), and log10 (4%).

5 months agoAArch64: Improve codegen in SVE tans
Luna Lamb [Fri, 3 Jan 2025 19:02:52 +0000 (19:02 +0000)] 
AArch64: Improve codegen in SVE tans

Improves memory access.
Tan: MOVPRFX 7 -> 2, LD1RD 12 -> 5, move MOV away from return.
Tanf: MOV 2 -> 1, MOVPRFX 6 -> 3, LD1RW 5 -> 4, move mov away from return.

5 months agoAArch64: Improve codegen in AdvSIMD asinh
Luna Lamb [Fri, 3 Jan 2025 19:00:12 +0000 (19:00 +0000)] 
AArch64: Improve codegen in AdvSIMD asinh

Improves memory access and removes spills.
Load the polynomial evaluation coefficients into 2 vectors and use lanewise
MLAs.  Reduces MOVs 6->3 , LDR 11->5, STR/STP 2->0, ADRP 3->2.

5 months agomath: Add a reference to Clang's <tgmath.h> C23 issue
H.J. Lu [Fri, 3 Jan 2025 02:24:54 +0000 (10:24 +0800)] 
math: Add a reference to Clang's <tgmath.h> C23 issue

Clang's <tgmath.h> doesn't support all C23 functions in glibc's <tgmath.h>:

https://github.com/llvm/llvm-project/issues/121536

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agoRename have-mtls-descriptor to have-test-mtls-descriptor
H.J. Lu [Fri, 3 Jan 2025 02:21:56 +0000 (10:21 +0800)] 
Rename have-mtls-descriptor to have-test-mtls-descriptor

Since have-mtls-descriptor is only used for glibc testing, rename it to
have-test-mtls-descriptor.  Also enable tst-gnu2-tls2-amx only if
$(have-test-mtls-descriptor) == gnu2.

Tested with GCC 14 and Clang 19/18/17 on x86-64.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agomath: update powerpc ulps
Andreas K. Hüttel [Fri, 3 Jan 2025 18:34:53 +0000 (19:34 +0100)] 
math: update powerpc ulps

Linux timberdoodle 6.1.60-gentoo-dist-hardened #1 SMP Fri Dec  1 22:10:49 UTC 2023 ppc64 POWER9 (architected), altivec supported CHRP IBM pSeries (emulated by qemu) GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agomath: update sparc ulps
Andreas K. Hüttel [Fri, 3 Jan 2025 14:40:06 +0000 (15:40 +0100)] 
math: update sparc ulps

Linux catbus 6.1.112 #1 SMP Sun Oct 13 10:52:08 PDT 2024 sparc64 sun4v UltraSparc T5 (Niagara5) GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agomath: update s390 ulps
Andreas K. Hüttel [Fri, 3 Jan 2025 14:36:56 +0000 (15:36 +0100)] 
math: update s390 ulps

Linux lgentoo4 6.8.9-gentoo #1 SMP Tue May  7 09:52:48 EDT 2024 s390x 8561 IBM GNU/Linux

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
5 months agoconform: Do not use __SIG_ATOMIC_TYPE__
Adhemerval Zanella [Tue, 31 Dec 2024 18:26:12 +0000 (15:26 -0300)] 
conform: Do not use __SIG_ATOMIC_TYPE__

clang does not define __SIG_ATOMIC_TYPE__, instead add another
directive ('size:') which instruct to use an integer type of
defined minimum size.

Reviewed-by: Sam James <sam@gentoo.org>
5 months agoRedirect mempcpy and stpcpy only in libc.a
H.J. Lu [Wed, 1 Jan 2025 00:20:34 +0000 (08:20 +0800)] 
Redirect mempcpy and stpcpy only in libc.a

The mempcpy and stpcpy redirections to __mempcpy and __stpcpy were added
by

commit 939da41143341bbcdd3dd50ee7b57776603da260
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Nov 12 22:36:34 2014 +0000

    Fix stpcpy / mempcpy namespace (bug 17573).

to fix the namespace bug since __mempcpy and __stpcpy were defined as
macros in <bits/string2.h>.  These macros call __builtin_mempcpy and
__builtin_stpcpy which may end up calling the C functions mempcpy
and stpcpy.  In libc.so, libc_hidden_builtin_proto ensures that calls
to mempcpy and stpcpy are in turn mapped to call __GI_mempcpy and
__GI_stpcpy.  The redirections were applied outside of libc.so, including
libc.a, to map mempcpy and stpcpy to __mempcpy and __stpcpy.  Since

commit 18b10de7ced9e9c3843299fb600e40b11af3e0af
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date:   Mon Jun 12 15:19:38 2017 +0100

    2017-06-12  Wilco Dijkstra  <wdijkstr@arm.com>

    There is no longer a need for string2.h, so remove it and all mention of it.
    Move the redirect for __stpcpy to include/string.h since it is
still required
    until all internal uses have been renamed.
    This fixes several linknamespace/localplt failures when building with -Os.

removed the __mempcpy and __stpcpy macros from the public header file,
limit these redirections to libc.a to avoid Clang error:

In file included from tst-iconv-sticky-input-error.c:22:
In file included from ./gconv_int.h:24:
../include/string.h:182:44: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
  182 | extern __typeof (mempcpy) mempcpy __asm__ ("__mempcpy");
      |                                            ^
../string/bits/string_fortified.h:42:8: note: previous definition is here
   42 | __NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
      |        ^

when testing with Clang for fortify build.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agonot-cancel.h: Support testing fortify build with Clang
H.J. Lu [Wed, 1 Jan 2025 23:22:36 +0000 (07:22 +0800)] 
not-cancel.h: Support testing fortify build with Clang

When Clang is used to test fortify glibc build configured with

--enable-fortify-source=N

clang issues errors like

In file included from tst-rfc3484.c:60:
In file included from ./getaddrinfo.c:81:
../sysdeps/unix/sysv/linux/not-cancel.h:36:10: error: reference to overloaded function could not be resolved; did you mean to call it?
   36 | __typeof (open64) __open64_nocancel;
      |          ^~~~~~~~
../include/bits/../../io/bits/fcntl2.h:127:1: note: possible target for call
  127 | open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag,
      | ^
../include/bits/../../io/bits/fcntl2.h:118:1: note: possible target for call
  118 | open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag)
      | ^
../include/bits/../../io/bits/fcntl2.h:114:1: note: possible target for call
  114 | open64 (const char *__path, int __oflag, mode_t __mode, ...)
      | ^
../io/fcntl.h:219:12: note: possible target for call
  219 | extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1));
      |            ^

because clang fortify support for functions with variable arguments relies
on function overload.  Update not-cancel.h to avoid __typeof on functions
with variable arguments.

Co-Authored-By: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agotst-unique[34].cc: Use explicit instantiation declaration/definition
H.J. Lu [Thu, 2 Jan 2025 11:03:47 +0000 (19:03 +0800)] 
tst-unique[34].cc: Use explicit instantiation declaration/definition

Use explicit instantiation declaration and definition to silence Clang
error:

tst-unique3.cc:6:18: error: instantiation of variable 'S<char>::i' required here, but no definition is available [-Werror,-Wundefined-var-template]
    6 | int t = S<char>::i;
      |                  ^
./tst-unique3.h:5:14: note: forward declaration of template entity is here
    5 |   static int i;
      |              ^
tst-unique3.cc:6:18: note: add an explicit instantiation declaration to suppress this warning if 'S<char>::i' is explicitly instantiated in another translation unit
    6 | int t = S<char>::i;
      |                  ^

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
5 months agoRISC-V: Regenerate ULPs
Aurelien Jarno [Thu, 2 Jan 2025 18:38:47 +0000 (19:38 +0100)] 
RISC-V: Regenerate ULPs

Generated on a VisionFive 2 board running Linux version 6.12.6 and
GCC 14.2.0.

Needed due to:
- commit bbd578b38df4 ("math: Use expm1f from CORE-MATH")
- commit 8ae9e513762b ("math: Use log1pf from CORE-MATH")
- commit 0ae0af68d8fa ("Implement C23 cospi")
- commit 776938e8b8dc ("Implement C23 sinpi")
- commit f9e90e4b4ce7 ("Implement C23 tanpi")
- commit 28d102d15c6a ("Implement C23 acospi")
- commit f962932206ec ("Implement C23 asinpi")
- commit ffe79c446ced ("Implement C23 atanpi")
- commit 3374de90386f ("Implement C23 atan2pi")
- commit a357d6273f79 ("math: Use atanf from CORE-MATH")
- commit 6f9bacf36b20 ("math: Use atan2f from CORE-MATH")
- commit e5ca265a9c90 ("new inputs with large errors for [a]cospi,
  [a]sinpi, [a]tanpi, atan2pi")

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
5 months agomlock, mlock2, munlock: Use __attr_access_none macro
Sam James [Thu, 2 Jan 2025 17:26:28 +0000 (17:26 +0000)] 
mlock, mlock2, munlock: Use __attr_access_none macro

This fixes build failures using GCC 7.5.0 against glibc headers,
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118194#c5.

Followup to 013106ae677af9836614ace1a01d25b63fa555a7.

Reported-by: vvinayag@arm.com
5 months agoAArch64: Update libm-test-ulps
Wilco Dijkstra [Thu, 2 Jan 2025 17:51:11 +0000 (17:51 +0000)] 
AArch64: Update libm-test-ulps

Update ulps for (a)cospi, (a)sinpi, (a)tanpi, atan2pi.

5 months agonew inputs with large errors for [a]cospi, [a]sinpi, [a]tanpi, atan2pi
Paul Zimmermann [Fri, 20 Dec 2024 09:41:38 +0000 (10:41 +0100)] 
new inputs with large errors for [a]cospi, [a]sinpi, [a]tanpi, atan2pi

These inputs were generated with the programs from
https://gitlab.inria.fr/zimmerma/math_accuracy,
with rounding to nearest:

* for univariate binary32 functions by exhaustive search
* for other functions with the "threshold" parameter up to 10^6

5 months agostdlib: fix lint failure
Sam James [Thu, 2 Jan 2025 17:09:14 +0000 (17:09 +0000)] 
stdlib: fix lint failure

Fixes: d5bceac99d24af1131b90027dab267e437b65cd1
5 months agostdlib: random_r: fix unaligned access in initstate and initstate_r [BZ #30584]
Sam James [Tue, 10 Dec 2024 01:21:46 +0000 (01:21 +0000)] 
stdlib: random_r: fix unaligned access in initstate and initstate_r [BZ #30584]

The initstate{,_r} interfaces are documented in BSD as needing an aligned
array of 32-bit values, but neither POSIX nor glibc's own documentation
require it to be aligned. glibc's documentation says it "should" be a power
of 2, but not must.

Use memcpy to read and write to `state` to handle such an unaligned
argument.

Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
6 months agoassert: Remove the use of %n from __assert_fail_base (BZ #32456)
Adhemerval Zanella [Mon, 30 Dec 2024 19:36:18 +0000 (16:36 -0300)] 
assert: Remove the use of %n from __assert_fail_base (BZ #32456)

The require size for mmap can be inferred from __vasprintf return
value.  It also fixes tst-assert-2 when building with --enable-fortify,
where even if the format is not translated, __readonly_area fails
because malloc can not be used.

Checked on aarch64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
6 months agoTranslations: Regenerate libc.pot
Adhemerval Zanella [Mon, 30 Dec 2024 19:36:17 +0000 (16:36 -0300)] 
Translations: Regenerate libc.pot

Reviewed-by: Florian Weimer <fweimer@redhat.com>
6 months agoelf: Remove the remaining uses of GET_ADDR_OFFSET
Florian Weimer [Thu, 2 Jan 2025 12:45:27 +0000 (13:45 +0100)] 
elf: Remove the remaining uses of GET_ADDR_OFFSET

Expand the macro where it is used in static definitions of
__tls_get_addr.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
6 months agoelf: Use TLS_DTV_OFFSET in __tls_get_addr
Florian Weimer [Thu, 2 Jan 2025 12:45:27 +0000 (13:45 +0100)] 
elf: Use TLS_DTV_OFFSET in __tls_get_addr

This fixes commit 5e249192cac7354af02a7347a0d8c984e0c88ed3 ("elf:
Remove the GET_ADDR_ARGS and related macros from the TLS code"):
GET_ADDR_ARGS was indeed unused, but GET_ADDR_OFFSET was used
on several targets, those that define TLS_DTV_OFFSET.  Instead
of reintroducing GET_ADDR_OFFSET, use TLS_DTV_OFFSET directly,
now that it is defined on all targets.

In the new tls_get_addr_adjust helper function, add a cast to
uintptr_t to help the s390 case, where the offset can be positive or
negative, depending on the addresses malloc returns.  The cast avoids
pointer wraparound/overflow.  The outer uintptr_t cast is needed
to suppress a warning on x86-64 x32 about mismatched integer/pointer
sizes.

Eventually this offset should be folded into the DTV addresses
themselves, to eliminate the subtraction on the TLS fast path.
This will require an adjustment to libthread_db because the
debugger interface currently returns unadjusted pointers.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
6 months agos390: Define TLS_DTV_OFFSET instead of GET_ADDR_OFFSET
Florian Weimer [Thu, 2 Jan 2025 12:45:27 +0000 (13:45 +0100)] 
s390: Define TLS_DTV_OFFSET instead of GET_ADDR_OFFSET

This will be used in __tls_get_addr to adjust the returned pointer
value.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
6 months agoelf: Introduce generic <dl-tls.h>
Florian Weimer [Thu, 2 Jan 2025 12:45:27 +0000 (13:45 +0100)] 
elf: Introduce generic <dl-tls.h>

On arc, the definition of TLS_DTV_UNALLOCATED now comes from
<dl-dtv.h>.

For x86-64 x32, a separate version is needed because unsigned long int
is 32 bits on this target.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
6 months agopowerpc: Update acosf ulps
Florian Weimer [Thu, 2 Jan 2025 10:56:42 +0000 (11:56 +0100)] 
powerpc: Update acosf ulps

As seen on powerpc64le-linux-gnu with GCC 11 defaulting to POWER9
instructions.

6 months agohtl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling into...
gfleury [Tue, 31 Dec 2024 13:49:09 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling into libc.

Message-ID: <20241231134909.1166440-9-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_{setrobust, setrobust_np}, pthread_mutexattr_{getrobust...
gfleury [Tue, 31 Dec 2024 13:49:08 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_{setrobust, setrobust_np}, pthread_mutexattr_{getrobust, getrobust_np} into libc.

Message-ID: <20241231134909.1166440-8-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.
gfleury [Tue, 31 Dec 2024 13:49:07 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.

Message-ID: <20241231134909.1166440-7-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_settype, pthread_mutexattr_gettype into libc.
gfleury [Tue, 31 Dec 2024 13:49:06 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_settype, pthread_mutexattr_gettype into libc.

Message-ID: <20241231134909.1166440-6-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_setprotocol into libc.
Samuel Thibault [Wed, 1 Jan 2025 22:51:53 +0000 (23:51 +0100)] 
htl: move pthread_mutexattr_setprotocol into libc.

Message-ID: <20241231134909.1166440-5-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_getprotocol into libc.
gfleury [Tue, 31 Dec 2024 13:49:04 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_getprotocol into libc.

Message-ID: <20241231134909.1166440-4-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_destroy into libc.
gfleury [Tue, 31 Dec 2024 13:49:03 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_destroy into libc.

Message-ID: <20241231134909.1166440-3-gfleury@disroot.org>

6 months agohtl: move pthread_mutexattr_init into libc.
gfleury [Tue, 31 Dec 2024 13:49:02 +0000 (15:49 +0200)] 
htl: move pthread_mutexattr_init into libc.

Message-ID: <20241231134909.1166440-2-gfleury@disroot.org>

6 months agobits/socket.h: Update to recent BSD definition
Samuel Thibault [Wed, 1 Jan 2025 21:07:42 +0000 (22:07 +0100)] 
bits/socket.h: Update to recent BSD definition

The old BSD 4.4 definition (not used by Linux) was not 64b-proof: the
cmsg_data field is supposed to CMSG_ALIGN'ed (as can be also seen in the
CMSG_LEN macro).

Suggested-by: Diego Nieto Cid <dnietoc@gmail.com>
6 months agoDon't update copyright notices in Linux licenses
Paul Eggert [Wed, 1 Jan 2025 20:16:06 +0000 (12:16 -0800)] 
Don't update copyright notices in Linux licenses

* scripts/update-copyrights: Do not update copyright notices
in licenses imported from the Linux kernel.
This should prevent glitches such as those fixed in my
recent commit.

6 months agoFix license typo induced by update-copyrighyt
Paul Eggert [Wed, 1 Jan 2025 19:07:29 +0000 (11:07 -0800)] 
Fix license typo induced by update-copyrighyt

6 months agoUpdate copyright dates not handled by scripts/update-copyrights
Paul Eggert [Wed, 1 Jan 2025 18:31:31 +0000 (10:31 -0800)] 
Update copyright dates not handled by scripts/update-copyrights

I've updated copyright dates in glibc for 2025.  This is the patch for
the changes not generated by scripts/update-copyrights and subsequent
build / regeneration of generated files.

6 months agoUpdate copyright in generated files by running "make"
Paul Eggert [Wed, 1 Jan 2025 18:25:08 +0000 (10:25 -0800)] 
Update copyright in generated files by running "make"

6 months agoUpdate copyright dates with scripts/update-copyrights
Paul Eggert [Wed, 1 Jan 2025 18:14:45 +0000 (10:14 -0800)] 
Update copyright dates with scripts/update-copyrights

6 months agoPass glibc pre-commit checks
Paul Eggert [Wed, 1 Jan 2025 19:16:35 +0000 (11:16 -0800)] 
Pass glibc pre-commit checks

This is needed for the next patch which updates copyright dates.
* assert/test-assert-2.c: Remove trailing white space.
* elf/tst-startup-errno.c: Remove trailing empty lines.

6 months agomlock, mlock2, munlock: Tell the compiler we don't dereference the pointer
Xi Ruoyao [Thu, 26 Dec 2024 04:51:18 +0000 (12:51 +0800)] 
mlock, mlock2, munlock: Tell the compiler we don't dereference the pointer

Since https://gcc.gnu.org/r11-959, the compiler emits
-Wmaybe-uninitialized if a const pointer to an uninitialized buffer is
passed.  Tell the compiler we don't dereference the pointer to remove
the false alarm.

Link: https://gcc.gnu.org/PR118194
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Sam James <sam@gentoo.org>