Commit Graph

42748 Commits

Author SHA1 Message Date
Hasaan Khan 8ced7815fb AArch64: Implement exp2m1 and exp10m1 routines
Vector variants of the new C23 exp2m1 & exp10m1 routines.

Note: Benchmark inputs for exp2m1 & exp10m1 are identical to exp2 & exp10
respectively, this also includes the floating point variations.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-09-02 16:50:24 +00:00
Florian Weimer 54bd776f99 Tests: Create files with mode 0666, not 0777 (bug 33171)
Mode 0777 should be used for directories only because it results
in executable entries (after typical umasks are applied).

Reviewed-by: Arjun Shankar <arjun@redhat.com>
2025-09-01 15:12:28 +02:00
Jonathan Wakely 576976eacc nptl: Fix "Arch-sepecific" typo in comment 2025-09-01 13:10:48 +01:00
Xi Ruoyao 0c6cb5285b nptl: Provide __pthread_rwlock_unlock compat symbol for versions before 2.43
The symbol was unintentionally leaked on ports introduced after
GLIBC_2.34, provide the compat symbol to avoid breaking ABI on them.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-09-01 09:07:35 +08:00
Xi Ruoyao 4a32b39bb1 nptl: Drop IS_IN (libpthread) around hidden_proto (__pthread_rwlock_unlock)
Now libpthread is a dummy library and it no longer contains
__pthread_rwlock_unlock at all, thus IS_IN (libpthread) does not make
sense here.

It seems an left over from commit eb29dcde31 ("nptl: Move rwlock
functions with forwarders into libc") and it caused libc.so to export an
unversioned __pthread_rwlock_unlock on Linux ports introduced after the
2.34 release (loongarch and or1k) but the symbol is not ever supposed to
be exported on those new ports.  Only since the commit 3b2b88ccee
("elf: early conversion of elf p_flags to mprotect flags") the header
dependency change happened to pull in libc-lockP.h which sets
hidden_proto (__pthread_rwlock_unlock) correctly, the symbol is no
longer exported, breaking the ABI on those ports.

Remove this #if as a clean up and to prevent such a mess from happening
again.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-09-01 09:07:35 +08:00
DJ Delorie 6dbaed693a login: fix ut_line comparison logic
ut_line[] is not a string, it's a fixed-width character field,
and may not be NUL terminated.  Thus, the use of strcmp is incorrect.
strncmp is more appropriate as it stops at the field size.

Note that differences beyond the field size do not count here,
as (1) this test doesn't do that, and (2) such differences are
traditionally ignored (i.e. logins that are silently truncated to
8 characters, etc)

While this is "only a test", we should still demonstrate the
correct way of doing things.  Also, using strncmp avoids a
"not a string" warning from gcc if you use -O1 or lower,
where it can't deduce that overflow won't happen.

Reviewed-by: Sam James <sam@gentoo.org>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-08-29 14:49:19 -04:00
DJ Delorie 320cf1e1b5 malloc: add tst-mxfast to hugetlb exclusion list
tst-mxfast needs GLIBC_TUNABLES to be set to its own value.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-08-29 13:22:19 -04:00
Uros Bizjak 119d658ac2 x86: Use flag output operands for inline asm in atomic-machine.h
Use the flag output constraints feature available in gcc 6+
("=@cc<cond>") instead of explicitly setting a boolean variable
with SETcc instruction.  This approach decouples the instruction
that sets the flags from the code that consumes them, allowing
the compiler to create better code when working with flags users.
Instead of e.g.:

   lock add %esi,(%rdi)
   sets   %sil
   test   %sil,%sil
   jne    <...>

the compiler now generates:

   lock add %esi,(%rdi)
   js     <...>

No functional changes intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-08-29 09:05:23 +02:00
Uros Bizjak 9a1cb8f783 x32: Fix, optimize and cleanup RSEQ_* accessors
Add missing "memory" clobber to accessors.  The "memory" clobber
tells the compiler that the assembly code performs memory reads
or writes to items other than those listed in the input and output
operands (for example, accessing the memory pointed to by one of
the input parameters).

Use MOVZBL instead of MOVB when reading 1-byte memory location
into a register.  MOVB to a register actually inserts into the LSB
of the word-sized register, making the result dependent on
the previous register value.  MOVZBL avoids this issue.

Change %P asm operand modifiers to %c.  The ‘c’ modifier is a
generic asm operand modifier that requires a constant operand and
prints the constant expression without punctuation.

Replace %b asm operand modifiers with explicit casts.  Explicit
casts inform the compiler which part of the register value is used,
allowing it to perform additional optimizations (e.g. narrowing the
preceding operation).

Remove %q asm operand modifiers.  Since the value is already cast
to 'long long int', the compiler will emit a 64-bit register name
in the assembly without needing %q.

No functional changes intended.

Tested-by: H.J. Lu <hjl.tools@gmail.com>
Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-28 04:57:24 -07:00
Henrik Lindström c49a32d7eb x86/configure: Improve portability of isa level check
wc -l pads the output with leading spaces on some systems, e.g. FreeBSD.
This results in the check `test "$count" = 1` failing. Use -eq for integer
comparison instead.

Signed-off-by: Henrik Lindström <henrik@lxm.se>
Reviewed-by: Arjun Shankar <arjun@redhat.com>
2025-08-27 17:14:15 +02:00
Cupertino Miranda 3b2b88ccee elf: early conversion of elf p_flags to mprotect flags
This patch replaces _dl_stack_flags global variable by
_dl_stack_prot_flags.
The advantage is that any convertion from p_flags to final used mprotect
flags occurs at loading of p_flags. It avoids repeated spurious
convertions of _dl_stack_flags, for example in allocate_thread_stack.

This modification was suggested in:
  https://sourceware.org/pipermail/libc-alpha/2025-March/165537.html

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-08-27 10:45:45 -03:00
Wilco Dijkstra 921e251e8f malloc: Support hugepages in mremap_chunk
Add mremap_chunk support for mmap()ed chunks using hugepages by accounting for
their alignment, to prevent the mremap call failing in most cases where the
size passed is not a hugepage size multiple. It also improves robustness for
reallocating hugepages since mremap is much less likely to fail, so running
out of memory when reallocating a larger size and having to copy the old
contents after mremap fails is also less likely.

To track whether an mmap()ed chunk uses hugepages, have a flag in the lowest
bit of the mchunk_prev_size field which is set after a call to sysmalloc_mmap,
and accessed later in mremap_chunk. Create macros for getting and setting this
bit, and for mapping the bit off when accessing the field for mmap()ed chunks.
Since the alignment cannot be lower than 8 bytes, this flag cannot affect the
alignment data.

Add malloc/tst-tcfree4-malloc-check to the tests-exclude-malloc-check list as
malloc-check prevents the tcache from being used to store chunks. This test
caused failures due to a bug in mem2chunk_check to be fixed in a later patch.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-08-27 13:07:09 +00:00
Wilco Dijkstra 614cfd0f8a malloc: Change mmap chunk layout
Change the mmap chunk layout to be identical to a normal chunk.  This makes it
safe for tcache to hold mmap chunks and simplifies size calculations in
memsize and musable.  Add mmap_base() and mmap_size() macros to simplify code.

Reviewed-by: Cupertino Miranda <cupertino.miranda@oracle.com>
2025-08-27 11:41:58 +00:00
Paul Zimmermann 0a96e56017 added benchmark inputs for rsqrtf and rsqrt
Changes with respect to v1:
- added missing rsqrt and rsqrtf in bench-math
2025-08-27 08:28:28 +02:00
Paul Zimmermann 170606d82c add missing benchmark files for several C23 binary64 functions
These files were prepared together with Saban Houssein.
2025-08-26 17:08:43 +02:00
Collin Funk 596dc7b676 manual: Refer to libc-alpha instead of a dead mailing list.
* manual/message.texi (Advanced gettext functions): Refer to
libc-alpha@sourceware.org instead of bug-glibc-manual@gnu.org which no
longer exists.
* NEWS: Likewise.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-08-25 16:45:42 -07:00
H.J. Lu 027505a07b Don't pass -c to LIBC_TRY_TEST_CC_OPTION
LIBC_TRY_TEST_CC_OPTION is defined with LIBC_TRY_CC_OPTION:

dnl Test a compiler option or options with an empty input file.
dnl LIBC_TRY_CC_OPTION([options], [action-if-true], [action-if-false])
AC_DEFUN([LIBC_TRY_CC_OPTION],
[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
        [$2], [$3])])

which passes -S to compiler.  Unlike gcc, when -c is also passed to clang
20, we get

configure:7838: clang -c -Werror -fsemantic-interposition -xc /dev/null -S -o /dev/null
clang: error: argument unused during compilation: '-c' [-Werror,-Wunused-command-line-argument]

Don't pass -c to LIBC_TRY_TEST_CC_OPTION since -c isn't needed.

This fixes BZ #33318.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-08-23 15:59:42 -07:00
H.J. Lu 7851260bf5 Remove test-have-mamx-tile from Makefile.in
Since have-mamx-tile is for TEST_CC only as shown in
sysdeps/x86_64/configure.ac:

LIBC_CONFIG_VAR([have-mamx-tile], [$libc_cv_test_x86_have_amx_tile])

remove test-have-mamx-tile from Makefile.in.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-08-23 15:58:00 -07:00
H.J. Lu 861d04967d Don't use -Wfree-labels/-Wmissing-parameter-name if unsupported
Don't use -Wfree-labels/-Wmissing-parameter-name for "make check" if
they are unsupported by TEST_CC.

This fixes BZ #33310.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-08-22 19:07:33 -07:00
H.J. Lu dd7122c057 Undef __INT64_C/__UINT64_C for glibc build and test
Since clang 20 defines __INT64_C and __UINT64_C as built-in macros, undef
them for glibc build and test.  This fixes BZ #33311.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-08-22 18:18:38 -07:00
H.J. Lu d142b7d205 Revert "Don't use -Wfree-labels/-Wmissing-parameter-name if unsupported"
This reverts commit ee06d98c5b.
2025-08-22 18:03:46 -07:00
H.J. Lu ee06d98c5b Don't use -Wfree-labels/-Wmissing-parameter-name if unsupported
Don't use -Wfree-labels/-Wmissing-parameter-name for "make check" if
they are unsupported by TEST_CC.

This fixes BZ #33310.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-08-22 17:56:09 -07:00
H.J. Lu dd4394b249 x86: Set have-protected-data to no if unsupported
If the building compiler enables no direct external data access by
default, access to protected data in shared libraries from executables
must be compiled with no direct external data access.  If the testing
compiler doesn't support it, set have-protected-data to no to disable
the tests which requires no direct external data access.

Add LIBC_TRY_CC_COMMAND to test a building compiler option or options
with an input file.

This fixes BZ #33286.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-08-22 17:55:32 -07:00
Maciej W. Rozycki aa4dbb2eeb stdio-common: Convert macros across scanf input specifier tests
Convert 'compare_real', 'read_real', and 'verify_input' macros to
functions so as to improve readability and avoid pitfalls.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki a1e5ee13ab stdio-common: Adjust header inclusion in scanf input specifier tests
Move the inclusion of the data class header from the individual tests to
the data-type-specific skeleton, providing for the use of the data type
under test in the data class header and reducing duplication.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki 2419637eb0 stdio-common: Include correct skeleton in scanf input specifier tests
Follow 'scanf' itself and use the system header inclusion variant for
the data-type-specific skeleton consistently across the remaining scanf
family functions so that any sysdeps/ variant takes precedence even in
the presence of a corresponding skeleton in stdio-common/ (though we
have no such arrangement at the moment).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki ca0f999a93 stdio-common: Fix NaN input data for scanf input specifier tests [BZ #32857]
Update NaN input data with 'n-char-sequence' in reference data matching
data under test, removing test failures with the M68K host.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki 27aa1fb735 stdio-common: Fix bad NaN crash in scanf input specifier tests [BZ #32857]
Fix a null pointer dereference causing a crash in 'read_real' when the
terminating null character is written for use with the subsequent call
to 'nan' for invalid NaN reference input, such as:

%a:nan:1:3:nanny:

by moving all the 'n-char-sequence' handling under the check for the
opening parenthesis.

No test case added as it's a test case issue in the first place.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki 67d2c9e3b7 stdio-common: Fix a crash in scanf input specifier tests [BZ #32857]
Fix a null pointer dereference causing a crash in 'read_real' when the
terminating null character is written for use with the subsequent call
to 'nan' for NaN reference input using null 'n-char-sequence', such as:

%a:nan():1:5:nan():

by moving the memory allocation call ahead of the check for the closing
parenthesis.

No test case added as it's a test case issue in the first place.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki da2a2581c4 stdio-common: Fix error reporting in scanf input specifier tests
Remove buffer contents reporting from the real variant of 'verify_input'
where there has been an input data format error making the contents of
data buffers irrelevant.

For example given invalid float input data:

%a:nan:1:3:nan(:

these messages are produced:

error: ./tst-scanf-format-skeleton.c:240: input buffer: `0000c07f'
error: ./tst-scanf-format-skeleton.c:240: value buffer: `0000c07f'
error: ./tst-scanf-format-skeleton.c:242: input line 1: input data format error

with the two former lines irrelevant.  Remove them from output then,
only leaving:

error: ./tst-scanf-format-skeleton.c:242: input line 1: input data format error

No test case added as it's a test case issue in the first place.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
Maciej W. Rozycki 2b16c76609 stdio-common: Reject insufficient character data in scanf [BZ #12701]
Reject invalid formatted scanf character data with the 'c' conversion
where there is not enough input available to satisfy the field width
requested.  It is required by ISO C that this conversion matches a
sequence of characters of exactly the number specified by the field
width and it is also already documented as such in our own manual:

"It reads precisely the next N characters, and fails if it cannot get
that many."

Currently a matching success is instead incorrectly produced where the
EOF condition is encountered before the required number of characters
has been retrieved, and the characters actually obtained are stored in
the buffer provided.

Add test cases accordingly and remove placeholders from 'c' conversion
input data for the existing scanf tests.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23 01:02:46 +01:00
H.J. Lu e377a7a8ec Disable -Wimplicit-fallthrough when clang is in use
Clang's -Wimplicit-fallthrough warning, which flags unannotated
fall-through in switch statements, does not recognize specific comments
like /* FALLTHROUGH */ for suppressing the warning, unlike GCC.  Since
fall through comments are used extensively in glibc, disable
-Wimplicit-fallthrough when clang is in use.

This fixes BZ #33312.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-08-22 16:32:02 -07:00
H.J. Lu b4ab549ae5 libio: Properly link in libio functions in static binaries
commit 3020f72618
Author: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Date:   Tue Dec 27 18:11:43 2022 -0300

    libio: Remove the usage of __libc_IO_vtables

added

 #define libio_static_fn_required(name) __asm (".globl " #name);

to link in libio functions in static binaries.  But there is no relocation
in
	.globl	_IO_file_open

and "strip --strip-unneeded" will remove such unreferenced symbols which
breaks static binaries.  Redefine libio_static_fn_required to create a
reference to the required function with

static __typeof (name) *const name##_p __attribute__((used)) = name;

This fixes BZ #33300.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Tested-by: Xi Ruoyao <xry111@xry111.site>
2025-08-22 12:03:00 -07:00
Uros Bizjak 3997c50f0b x86_64: Use __seg_fs qualifiers in NPTL accessors
Use __seg_fs named address space qualifiers to cast NPTL accessors
to %fs: prefixed addresses.  Use volatile access only where
strictly necessary.

Use existing assembly RSEQ_* accessors for x32 to
work around the GCC bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121613

because negative value in __rseq_offset is used
as an offset from %fs.

Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
2025-08-22 06:36:14 -07:00
H.J. Lu bb7fb0f1a7 x86: Remove an extra space before THREAD_SELF
After

f6dd43d5f7 i386: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()
b0f0c41a5f x86_64: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()

removed the unnecessary __GNUC_PREREQ (6, 0) test, remove the extra space
before THREAD_SELF macro name.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-21 19:32:30 -07:00
Uros Bizjak b0f0c41a5f x86_64: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()
Currenty GCC-12 is required as the minimum supported compiler
version.  Remove stalled __GNUC_PREREQ (6, 0) test for
GCC compiler version in THREAD_SELF() macro definition.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20 11:48:27 -07:00
Uros Bizjak 0e49fc68aa i386: Use __seg_gs qualifiers in NPTL accessors
Use __seg_gs named address space qualifiers to cast NPTL accessors
to %gs: prefixed addresses.  Use volatile access only where
strictly necessary.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20 11:48:23 -07:00
Uros Bizjak f6dd43d5f7 i386: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()
Currenty GCC-12 is required as the minimum supported compiler
version.  Remove stalled __GNUC_PREREQ (6, 0) test for
GCC compiler version in THREAD_SELF() macro definition.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20 11:48:20 -07:00
Uros Bizjak f80dddbe29 i386: Use TESTB instead of TESTL in ____longjmp_chk()
There is no need to use TESTL when checking the least-significant bit
with a TEST instruction. Use TESTB, which is three bytes shorter:

   f6 44 24 04 01          testb  $0x1,0x4(%esp)

vs:

   f7 44 24 04 01 00 00    testl  $0x1,0x4(%esp)
   00

for the same effect.

No functional changes intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20 11:48:17 -07:00
Uros Bizjak dd38f49cdc x86_64: Use TESTB instead of TESTL in CHECK_INVALID_LONGJMP
There is no need to use TESTL when checking the least-significant bit
with a TEST instruction. Use TESTB, which is three bytes shorter:

   f6 44 24 f0 01      	   testb  $0x1,-0x10(%rsp)

vs:

   f7 44 24 f0 01 00 00    testl  $0x1,-0x10(%rsp)
   00

for the same effect.

No functional changes intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20 11:47:53 -07:00
Pierre Blanchard aac077645a AArch64: Fix SVE powf routine [BZ #33299]
Fix a bug in predicate logic introduced in last change.
A slight performance improvement from relying on all true
predicates during conversion from single to double.
This fixes BZ #33299.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-08-20 17:45:21 +00:00
Arjun Shankar 6f999af332 support: Handle FUSE_GETXATTR during FUSE FS mount
When testing with some kernel versions, support FUSE infrastructure
encounters a FUSE_GETXATTR request, leading to FUSE tests hanging until
timed out.  Therefore, pass FUSE_GETXATTR requests from
support_fuse_handle_mountpoint to support_fuse_handle_directory, and
adjust support_fuse_handle_directory to return ENOSYS so that tests can
proceed.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-08-19 09:54:38 +02:00
caiyinyu d4ccda8e69 malloc: Fix tst bug in malloc/tst-free-errno-malloc-hugetlb1.
When transparent hugepages (THP) are configured to 32MB on x86/loongarch
systems, the current big_size value may not be sufficiently large to
guarantee that free(ptr) [1] will call munmap(ptr_aligned, big_size).

Tested on x86_64 and loongarch64.

PS: Without this patch and using 32M THP, there is a about 50% chance
that malloc/tst-free-errno-malloc-hugetlb1 will fail on both x86_64 and
loongarch64.

[1] malloc/tst-free-errno.c:
...
       errno = 1789;
       /* This call to free() is supposed to call
            munmap (ptr_aligned, big_size);
          which increases the number of VMAs by 1, which is supposed
          to fail.  */
->     free (ptr);
       TEST_VERIFY (get_errno () == 1789);
     }
...

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-08-19 09:05:32 +08:00
H.J. Lu bd4628f3f1 i386: Also add GLIBC_ABI_GNU2_TLS version [BZ #33129]
Since the GNU2 TLS run-time bug:

https://sourceware.org/bugzilla/show_bug.cgi?id=31372

affects both i386 and x86-64, also add GLIBC_ABI_GNU2_TLS version to i386
to indicate the working GNU2 TLS run-time.  For x86-64, the additional
GNU2 TLS run-time bug fix is needed for

https://sourceware.org/bugzilla/show_bug.cgi?id=31501

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-08-18 11:58:01 -07:00
gfleury 098e449df0 htl: move sem_unlink into libc.
Message-ID: <20250817104023.91919-8-gfleury@disroot.org>
2025-08-18 01:06:41 +02:00
gfleury f5a43420e2 htl: move sem_{clockwait, timedwait, wait, trywait} into libc.
Message-ID: <20250817104023.91919-7-gfleury@disroot.org>
2025-08-18 01:06:38 +02:00
gfleury 795f5f2a8b htl: move sem_post into libc.
Message-ID: <20250817104023.91919-6-gfleury@disroot.org>
2025-08-18 00:55:33 +02:00
gfleury 50f5ddc20a htl: move sem_open, sem_close into libc.
Message-ID: <20250817104023.91919-5-gfleury@disroot.org>
2025-08-18 00:55:18 +02:00
gfleury b2b6d32f11 htl: move sem_init into libc.
Message-ID: <20250817104023.91919-4-gfleury@disroot.org>
2025-08-18 00:23:11 +02:00
gfleury 11c07af422 htl: move sem_getvalue into libc.
Message-ID: <20250817104023.91919-3-gfleury@disroot.org>
2025-08-18 00:22:53 +02:00