platform/upstream/glibc.git
13 months agopackaging: fix rpmbuild errors
Dongkyun Son [Mon, 16 Jan 2023 02:56:04 +0000 (11:56 +0900)]
packaging: fix rpmbuild errors

Macro expanded in comment on line 810: %{_lib}/obsolete/noversion
Macro expanded in comment on line 811: %{_lib}/obsolete/noversion/libNoVersion.so.1

Change-Id: Ib8111cfc9fa90dfe77175a28cef44464715e47fd
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agopackaging: install libthread_db under a regular name
Łukasz Stelmach [Fri, 29 Jul 2022 17:17:34 +0000 (19:17 +0200)]
packaging: install libthread_db under a regular name

See 86f0179bc0 ("nptl_db: Install libthread_db under a regular implementation name")

Change-Id: Id2da2b8d2d9a9c0f51d9f6f0a4254f385d5e15f1
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
13 months agopackaging: Install libraries under ABI names
Łukasz Stelmach [Fri, 29 Jul 2022 09:07:54 +0000 (11:07 +0200)]
packaging: Install libraries under ABI names

See 8208be389b ("Install shared objects under their ABI names")

Change-Id: I97578a7747668da9b5755e80ab8cf1f75a974b24
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
13 months agopackaging: remove nis/ nss
Dongkyun Son [Mon, 16 Jan 2023 01:33:59 +0000 (10:33 +0900)]
packaging: remove nis/ nss

Fix install error :

+ install -m 644 nis/nss /home/abuild/rpmbuild/BUILDROOT/glibc-2.36-0.i386/etc/default/
install: cannot stat `nis/nss': No such file or directory

Change-Id: Ic0e0585748e01e5dc9f4809aec296bcf9df9e8de
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agotizen: Use getline() when building nss_optfiles
Łukasz Stelmach [Thu, 21 Jul 2022 21:02:23 +0000 (23:02 +0200)]
tizen: Use getline() when building nss_optfiles

After moving to libc (6212bb67f4 "nss_files: Move into libc") started
using __getline() (0e1f068108 "Fix linknamespace errors and
local-plt-usages in nss_files.") which is not available when building
nss_optfiles as a module.

Change-Id: I1e7443bcb64b6c63c8d47b53afdc3e8916702416
Fixes: 0b9125e2a3 ("tizen: Add optfiles nss module")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
13 months agopackaging: Fix asan build on aarh64
Dongkyun Son [Thu, 28 Jul 2022 23:59:06 +0000 (08:59 +0900)]
packaging: Fix asan build on aarh64

    When running 2nd glibc build for asan, there are errors from
    conflicting types for fgetpos and fsetpos. This is from not
    matched LARGEFILE related definitions. Undefine the related
    definitions like armv7l build.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
Change-Id: I3d2f3ddaceca9bd55adec83b775760d1f42fdd09

13 months agopackaging: Add support for enable_static_pie project config macro
Slava Barinov [Tue, 27 Jul 2021 09:01:09 +0000 (12:01 +0300)]
packaging: Add support for enable_static_pie project config macro

This switch will turn on support for static PIE binaries build for glibc.

Change-Id: I2ff4be151aafe91bbdc2a7ae9f89a11b54b106f5
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months ago[HWASan] Prepare hwasan-enabled build
Slava Barinov [Thu, 19 Aug 2021 11:05:29 +0000 (14:05 +0300)]
[HWASan] Prepare hwasan-enabled build

Package glibc-hwasan.rpm provides HWASan-sanitized version of glibc for testing
purposes.

Change-Id: Ie5a3ba6b80823dbc422b281846d64a6740674d2c
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months ago[HWASan] Unforce gcc options for hwasan build
Andrey Kazmin [Thu, 11 Mar 2021 08:26:27 +0000 (11:26 +0300)]
[HWASan] Unforce gcc options for hwasan build

Change-Id: If4d164bcb9ed349fbf29eb324da73e869d639a62
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
13 months agoTurn off tst-udp-timeout test
Slava Barinov [Tue, 13 Jul 2021 10:24:55 +0000 (13:24 +0300)]
Turn off tst-udp-timeout test

The test is flaky and causes freeze both in buildroot and on RPi

Change-Id: I9621b110e3b085b16a369d92d2b322f798aaab1a
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agoaarch64: Remove file offset flags from Glibc build
Dongkyun Son [Wed, 23 Jun 2021 11:00:42 +0000 (20:00 +0900)]
aarch64: Remove file offset flags from Glibc build

update commit: 565c59bcea65d00c519fa5a2e5285721c50a6c6b

Change-Id: Id8644cd6f96d5d0b8bd41776433d4727e4b1ea34
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agopackaging: Add -k flag to 'make check'
Slava Barinov [Wed, 14 Apr 2021 12:49:45 +0000 (15:49 +0300)]
packaging: Add -k flag to 'make check'

Currently make fails and test procedure stops after first failed test.

Change-Id: I28dce3ee30a7d0ac240b46e01c9a23e59b3ed61a
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agopackaging: Clean up build procedure
Slava Barinov [Mon, 18 Jan 2021 16:23:38 +0000 (19:23 +0300)]
packaging: Clean up build procedure

- Redundant functions removed, build simplified
- Build directory renamed to "build"
- Test procedure fixed, including run_tests_on_device mode
- testresults.rpm package enhanced and now contains test output

Change-Id: Ia3754697d6cff7e79b20be09450a20513d066383

13 months agopackaging: Add support for %run_tests_on_device
Slava Barinov [Wed, 9 Sep 2020 13:52:45 +0000 (16:52 +0300)]
packaging: Add support for %run_tests_on_device

This variable allows to prepare buildroot for running testsuite on device

Change-Id: I14d652d198f65f6662bf22deb23d6cbf6dd156af
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agopackaging: Add support for configure-dumper
Slava Barinov [Thu, 4 Jun 2020 14:01:00 +0000 (17:01 +0300)]
packaging: Add support for configure-dumper

Change-Id: Id52b2d7c5f5fd8ab391ee2f8d872937c0108ef3c
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agopackaging: Fix ASan build for armv7l
Slava Barinov [Thu, 30 Apr 2020 14:27:23 +0000 (17:27 +0300)]
packaging: Fix ASan build for armv7l

Change-Id: I61ea1881efd00fd9377db78d4398311b01540b77
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agopackaging: Support 32bit build for armv8-a CPU
Slava Barinov [Mon, 13 Apr 2020 11:06:19 +0000 (14:06 +0300)]
packaging: Support 32bit build for armv8-a CPU

Change-Id: I8e10854e04c31f546c4391efb997334804049b71
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agoRevert "packaging: remove '-g' option to ix86's BuildFlags."
Dongkyun Son [Thu, 13 Feb 2020 06:57:37 +0000 (15:57 +0900)]
Revert "packaging: remove '-g' option to ix86's BuildFlags."

This reverts commit 56e1ccac650144a76d7a9c2e6016a01d2227d2ca.

Change-Id: If76115f26ad39342e1d8f3e42f8b5a6de87facda

13 months agopackaging: add support option for -fstack-protector-strong
Dongkyun Son [Tue, 28 Nov 2017 19:37:11 +0000 (04:37 +0900)]
packaging: add support option for -fstack-protector-strong

Change-Id: Ifabf235b9a4720aefb31ea52ec44d34000257d62
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agopackaging: Turning on PIE compilation by default
Slava Barinov [Wed, 5 Feb 2020 11:20:41 +0000 (14:20 +0300)]
packaging: Turning on PIE compilation by default

This makes all glibc internal tools (like getent) pie.

Change-Id: I134ec4c1d858397597d51411ed0073cb7330dc74
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agopackaging: remove '-g' option to ix86's BuildFlags.
Dongkyun Son [Fri, 31 Jan 2020 05:23:29 +0000 (14:23 +0900)]
packaging: remove '-g' option to ix86's BuildFlags.

This is temporary commit for application build check with previous
toolchain's ld.

/home/swc/tizen-studio/tools/i586-linux-gnueabi-gcc-6.2/bin/../lib/gcc/i586-tizen-linux-gnueabi/6.2.1/../../../../i586-tizen-linux-gnueabi/bin/ld: /home/swc/tizen-studio/tools/smart-build-interface/../../platforms/tizen-6.0/mobile/rootstraps/mobile-6.0-emulator.core.public.20200129_1/usr/lib/crti.o: unable to initialize decompress status for section .debug_line
/home/swc/tizen-studio/tools/i586-linux-gnueabi-gcc-6.2/bin/../lib/gcc/i586-tizen-linux-gnueabi/6.2.1/../../../../i586-tizen-linux-gnueabi/bin/ld: /home/swc/tizen-studio/tools/smart-build-interface/../../platforms/tizen-6.0/mobile/rootstraps/mobile-6.0-emulator.core.public.20200129_1/usr/lib/crti.o: unable to initialize decompress status for section .debug_line
/home/swc/tizen-studio/tools/i586-linux-gnueabi-gcc-6.2/bin/../lib/gcc/i586-tizen-linux-gnueabi/6.2.1/../../../../i586-tizen-linux-gnueabi/bin/ld: /home/swc/tizen-studio/tools/smart-build-interface/../../platforms/tizen-6.0/mobile/rootstraps/mobile-6.0-emulator.core.public.20200129_1/usr/lib/crti.o: unable to initialize decompress status for section .debug_line
/home/swc/tizen-studio/tools/i586-linux-gnueabi-gcc-6.2/bin/../lib/gcc/i586-tizen-linux-gnueabi/6.2.1/../../../../i586-tizen-linux-gnueabi/bin/ld: /home/swc/tizen-studio/tools/smart-build-interface/../../platforms/tizen-6.0/mobile/rootstraps/mobile-6.0-emulator.core.public.20200129_1/usr/lib/crti.o: unable to initialize decompress status for section .debug_line
/home/swc/tizen-studio/tools/smart-build-interface/../../platforms/tizen-6.0/mobile/rootstraps/mobile-6.0-emulator.core.public.20200129_1/usr/lib/crti.o: file not recognized: File format not recognized

Related bug in assembler(gas) in binutils 2.31.1 and older:
Fixed binutils 2.32: https://sourceware.org/PR23919 .

Change-Id: Ib5c13e5474d490cb106b2d48608090857913c656
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agoRevert "REMOVE ME: turn off crti/crtn debug section"
Dongkyun Son [Mon, 3 Feb 2020 05:24:38 +0000 (14:24 +0900)]
Revert "REMOVE ME: turn off crti/crtn debug section"

This reverts commit b2b31d0007b81bac969f02385c142f4ae4f22ca9.

Change-Id: I9aa925227d8283f9c063442819dbe773eecc3c7a

13 months agoREMOVE ME: turn off crti/crtn debug section
Slava Barinov [Fri, 31 Jan 2020 06:54:10 +0000 (09:54 +0300)]
REMOVE ME: turn off crti/crtn debug section

Change-Id: Id3c7539d9cbc4316c496c091c56d4337c4d1027d
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agoRemove file offset flags from Glibc build
Slava Barinov [Mon, 13 Jan 2020 07:30:19 +0000 (10:30 +0300)]
Remove file offset flags from Glibc build

Glibc has to be built without these defines since it must have both 32bit and
64bit implementations

Change-Id: I1f08b70ab18447d842861e40d45c3a107f1bf206
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agoBuild glibc itself with default offset bits
Mikhail Kashkarov [Thu, 5 Dec 2019 18:46:54 +0000 (21:46 +0300)]
Build glibc itself with default offset bits

Signed-off-by: Mikhail Kashkarov <m.kashkarov@partner.samsung.com>
13 months agoAdd rpm with testresults
Mikhail Kashkarov [Fri, 20 Sep 2019 15:54:52 +0000 (18:54 +0300)]
Add rpm with testresults

Define "run_tests" or "glibc_run_tests" to enable it.

Change-Id: I14376885661f99efe001d3b86e57d5370475559e

13 months ago[Tizen 6.0] Release 2.30 version
Mikhail Kashkarov [Thu, 28 Nov 2019 16:01:23 +0000 (19:01 +0300)]
[Tizen 6.0] Release 2.30 version

13 months agoSmack: add acess label to ldconfig to prevent privilege escalation
Dongkyun Son [Wed, 10 Apr 2019 08:28:48 +0000 (17:28 +0900)]
Smack: add acess label to ldconfig to prevent privilege escalation

Change-Id: I5df0c2fa2c868dee6d3ee38ce8a4d53ce038efe8
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agopackaging: add --disable-experimental-malloc
Dongkyun Son [Wed, 12 Sep 2018 08:42:17 +0000 (17:42 +0900)]
packaging: add --disable-experimental-malloc

Switch off USE_TCACHE to keep the idle memory usage.

Change-Id: I97a31e904bdcb6600975a04333478cac899ab668
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
13 months agotizen: Add optfiles nss module
Karol Lewandowski [Fri, 31 Aug 2018 14:14:30 +0000 (16:14 +0200)]
tizen: Add optfiles nss module

Add optfiles module that can search passwd and group (incl. shadow)
databases in tizen-specific /opt/etc/ directory.

By default passwd & shadow databases are enabled. Group membership
will be granted by security-manager.

Change-Id: Id0cc4f86c9ddd06f2a4b1032b51451fab74a9d3a

13 months agoRepair glibc make check with -Wformat options enabled.
Mikhail Kashkarov [Fri, 13 Jul 2018 17:44:40 +0000 (20:44 +0300)]
Repair glibc make check with -Wformat options enabled.

With -Wformat options enabled there are test fails:

  cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
  cc1: all warnings being treated as errors
  ../o-iterator.mk:9: recipe for target
  '/home/abuild/rpmbuild/BUILD/glibc-2.24/cc-base/time/test_time.o' failed

As some targets disables -Wformat explicitly:

(time/Makefile):
  # Don't warn about Y2k problem in strftime format string.
  CFLAGS-test_time.c = -Wno-format

Change-Id: Ic0f8b6bb07ea7875a75b994584ac10cec6515827

13 months ago[ASan] Enable build with ASan.
Denis Khalikov [Fri, 8 Sep 2017 14:38:06 +0000 (17:38 +0300)]
[ASan] Enable build with ASan.

This patch enables ASan instrumentation for glibc.

1. Modifies rltd to support calling init for libasan.so
before libc.so. Also changes don't brake backward
compatibility against libpthread.so, because rtld will add
libpthread.so as a first library to initlist.

2. Changes the type of symbol __sched_cpucount from IFUNC
to FUNC, to avoid segfault at the relocation stage.
IFUCN is a spectial type of symbol which allows to call
resolver at the relocation stage (symbol binding),
so resolver instrumented with ASan will cause a segfault.

Change-Id: I99b6e230605801123e3e132f9934c75fae4e6cfa

13 months agopackaging: Apply ASLR
Jaehun Jeong [Thu, 24 Aug 2017 00:45:04 +0000 (09:45 +0900)]
packaging: Apply ASLR

For enhance tizen security, ASLR(Address space layout randomization) is default after tizen 4.0.
All executable of glibc should be built with '-pie' option.

ldconfig and glibc_post_upgrade linked statically with all libraries
are not built with '-pie' due to conflict with '-static' link option.

TC result of all submodules have consistency between before and after
this patch except for elf. because it is releated with prelink function.
so the elf TC is always fail under ASLR.

Change-Id: I8cbdf31914e0170d7d28385d830fd45a7a30d75d
Signed-off-by: Jaehun Jeong <jh4u.jeong@samsung.com>
13 months agopackaging: Switch off ASan
Slava Barinov [Fri, 28 Jul 2017 15:13:02 +0000 (18:13 +0300)]
packaging: Switch off ASan

Change-Id: I38e228d0389905dac11a300295cfc32df0cfe112
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
13 months agopackaging: add license files to all sub components
Dongkyun, Son [Fri, 7 Apr 2017 01:31:16 +0000 (10:31 +0900)]
packaging: add license files to all sub components

The license files are added to only library components because they could be
included to target binary.

Change-Id: I7cb352ba1457709ba440b1a926056f1b1d74bd3e
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agopackaging: provide 64bit libs on 32bit build env
Chan Lee [Thu, 16 Mar 2017 05:29:15 +0000 (14:29 +0900)]
packaging: provide 64bit libs on 32bit build env

In some cases, especially .Net toolchain needs 64bit libs to execute
even though 32bit build environment.
It's a little weird but possble because almost archtecture of build machine is 64bit.

Change-Id: I0582231028edf64b0cb8e751ec3aba3ccb8e0e0e
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
13 months agoLie about futex_atomic_cmpxchg_inatomic kernel support.
Dongkyun, Son [Wed, 20 May 2015 01:01:33 +0000 (10:01 +0900)]
Lie about futex_atomic_cmpxchg_inatomic kernel support.

In past versions of glibc, we incorrectly assumed all ARM kernels
in all configurations supported futex_atomic_cmpxchg_inatomic. This
was clearly a lie, however it was a lie that we relied on, because
the fallback implementation appears to not play nicely with certain
applications like pulseaudio.  Restore the lie for kernels > 2.6.32
and plug our ears and scream "LA LA LA" about how wrong this is.

Author: Adam Conrad <adconrad@ubuntu.com>
Bug-Ubuntu: https://launchpad.net/bugs/1436162
Last-Update: 2015-03-25

Change-Id: I9d9ceffd5dd2d2f37e45b282317febfb6524b4a8
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agopackaging: Enable memcpy in sysdeps/arm/memcpy.S for ARM
Pavel Kopyl [Sun, 12 Mar 2017 18:59:01 +0000 (18:59 +0000)]
packaging: Enable memcpy in sysdeps/arm/memcpy.S for ARM

Enable memcpy in sysdeps/arm/memcpy.S for ARM
instead of memcpy in sysdeps/arm/armv7/multiarch/

Turn on --disable-multi-arch option for configure except %{ix86} x86_64 arch.

(port from tizen_3.0_base:3a309608ceb25843584b0a2c9075c16a1b892e86)

Change-Id: Ia22d4cd3821fea2a7ea0ef2179fc0b4f6e6ef3e9
Signed-off-by: Pavel Kopyl <p.kopyl@samsung.com>
13 months agoNss configuration update
Bartlomiej Grzelewski [Fri, 8 Jul 2016 13:13:30 +0000 (15:13 +0200)]
Nss configuration update

During user switch we must set up groups related with privileges
owned by user. The list of groups is taken from security-manager
service.

Change-Id: I3b01aad84880328e51eccf6ed12f4082f5b639cc

13 months agopackaging: renamed linaro-glibc.spec -> glibc.spec
Dongkyun, Son [Wed, 1 Feb 2017 11:08:42 +0000 (20:08 +0900)]
packaging: renamed linaro-glibc.spec -> glibc.spec

Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agopackaging: remove fno-omit-frame-pointer from optflags
Dongkyun, Son [Tue, 18 Oct 2016 23:23:15 +0000 (08:23 +0900)]
packaging: remove fno-omit-frame-pointer from optflags

fix error: bp cannot be used in asm here
(under ../sysdeps/unix/sysv/linux/posix_fallocate.c:39:1)

Signed-off-by: Ivan Baravy <i.baravy@samsung.com>
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agopackaging: disabled libmvec library.
Dongkyun, Son [Wed, 31 Aug 2016 04:04:39 +0000 (13:04 +0900)]
packaging: disabled libmvec library.

Libmvec is vector math library added in Glibc 2.22.

Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agopackaging: fix build error
Dongkyun, Son [Thu, 25 Aug 2016 11:40:28 +0000 (20:40 +0900)]
packaging: fix build error

'bits/stdio-lock.h': No such file or directory

Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
13 months agopackaging: add packaging
Dongkyun, Son [Thu, 25 Aug 2016 10:48:25 +0000 (19:48 +0900)]
packaging: add packaging

Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
16 months agoCreate ChangeLog.old/ChangeLog.26. upstream-2.37 upstream/2.37
Carlos O'Donell [Wed, 1 Feb 2023 03:27:45 +0000 (22:27 -0500)]
Create ChangeLog.old/ChangeLog.26.

16 months agoPrepare for glibc 2.37 release.
Carlos O'Donell [Wed, 1 Feb 2023 02:29:05 +0000 (21:29 -0500)]
Prepare for glibc 2.37 release.

Update version.h, and include/features.h.

16 months agox86: Fix strncat-avx2.S reading past length [BZ #30065]
Noah Goldstein [Tue, 31 Jan 2023 23:46:56 +0000 (17:46 -0600)]
x86: Fix strncat-avx2.S reading past length [BZ #30065]

Occurs when `src` has no null-term.

Two cases:

1) Zero-length check is doing:
```
    test    %rdx, %rdx
    jl      L(zero_len)
```
which doesn't actually check zero (was at some point `decq` and the
flag never got updated).

The fix is just make the flag `jle` i.e:
```
    test    %rdx, %rdx
    jle     L(zero_len)
```

2) Length check in page-cross case checking if we should continue is
doing:
```
    cmpq    %r8, %rdx
    jb      L(page_cross_small)
```
which means we will continue searching for null-term if length ends at
the end of a page and there was no null-term in `src`.

The fix is to make the flag:
```
    cmpq    %r8, %rdx
    jbe     L(page_cross_small)
```

16 months agoUpdate install.texi, and regenerate INSTALL.
Carlos O'Donell [Tue, 31 Jan 2023 22:15:24 +0000 (17:15 -0500)]
Update install.texi, and regenerate INSTALL.

16 months agoUpdate manual/contrib.texi.
Carlos O'Donell [Tue, 31 Jan 2023 22:01:30 +0000 (17:01 -0500)]
Update manual/contrib.texi.

Thank Yinyu Cai for their maintainership of the LoongArch port.

Thank Vineet Gupta for their maintainership of the ARC port.

Thank Tulio Magno Quites Machado Filho for their past maintainership
of the PowerPC port.

Thank Rajalakshmi Srinivasaraghavan for their current maintainership
of the PowerPC port.

16 months agoUpdate NEWS file with bug fixes.
Carlos O'Donell [Tue, 31 Jan 2023 22:00:58 +0000 (17:00 -0500)]
Update NEWS file with bug fixes.

16 months agoRegenerate configure.
Carlos O'Donell [Tue, 31 Jan 2023 21:48:15 +0000 (16:48 -0500)]
Regenerate configure.

Run using vanilla upstream autoconf 2.69.

Minor whitespace change to sysdeps/loongarch/configure and
sysdeps/mach/configure, and nothing else.

16 months agoUpdate all PO files in preparation for release.
Carlos O'Donell [Tue, 31 Jan 2023 21:30:44 +0000 (16:30 -0500)]
Update all PO files in preparation for release.

16 months agodoc: correct _FORTIFY_SOURCE doc in features.h
fanquake [Tue, 31 Jan 2023 13:25:11 +0000 (13:25 +0000)]
doc: correct _FORTIFY_SOURCE doc in features.h

16 months agolibio: Update number of written bytes in dprintf implementation
Florian Weimer [Tue, 31 Jan 2023 21:22:02 +0000 (22:22 +0100)]
libio: Update number of written bytes in dprintf implementation

The __printf_buffer_flush_dprintf function needs to record that
the buffer has been written before reusing it.  Without this
accounting, dprintf always returns zero.

Fixes commit 8ece45e4f586abd212d1c02d74d38ef681a45600
("libio: Convert __vdprintf_internal to buffers").

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
16 months agoAccount for octal marker in %#o format
Andreas Schwab [Fri, 27 Jan 2023 22:25:59 +0000 (23:25 +0100)]
Account for octal marker in %#o format

16 months agoUse binutils 2.40 branch in build-many-glibcs.py
Joseph Myers [Fri, 27 Jan 2023 20:53:50 +0000 (20:53 +0000)]
Use binutils 2.40 branch in build-many-glibcs.py

This patch makes build-many-glibcs.py use binutils 2.40 branch.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).

16 months agoUse MPFR 4.2.0, MPC 1.3.1 in build-many-glibcs.py
Joseph Myers [Fri, 27 Jan 2023 18:27:26 +0000 (18:27 +0000)]
Use MPFR 4.2.0, MPC 1.3.1 in build-many-glibcs.py

This patch makes build-many-glibcs.py use the new MPFR 4.2.0 and MPC
1.3.1 releases.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).

16 months agostdio-common: Handle -1 buffer size in __sprintf_chk & co (bug 30039)
Florian Weimer [Wed, 25 Jan 2023 07:01:00 +0000 (08:01 +0100)]
stdio-common: Handle -1 buffer size in __sprintf_chk & co (bug 30039)

This shows up as an assertion failure when sprintf is called with
a specifier like "%.8g" and libquadmath is linked in:

Fatal glibc error: printf_buffer_as_file.c:31
  (__printf_buffer_as_file_commit): assertion failed:
  file->stream._IO_write_ptr <= file->next->write_end

Fix this by detecting pointer wraparound in __vsprintf_internal
and saturate the addition to the end of the address space instead.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
16 months agoDocument '%F' format specifier
Paul Pluzhnikov [Wed, 25 Jan 2023 00:39:31 +0000 (00:39 +0000)]
Document '%F' format specifier

The '%F' format specifier was implemented in commit 6c46718f9f0 on
2000-08-23, but remains undocumented in the manual.
https://stackoverflow.com/questions/75157669/format-specifier-f-missing-from-glibcs-documentation

Fix that.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
16 months agosparc (64bit): Regenerate ulps
Andreas K. Hüttel [Sun, 22 Jan 2023 23:46:02 +0000 (00:46 +0100)]
sparc (64bit): Regenerate ulps

Linux catbus 5.15.69-gentoo #1 SMP Sat Sep 24 07:56:24 PDT 2022 sparc64 sun4v UltraSparc T5 (Niagara5) GNU/Linux
gcc (Gentoo 11.3.1_p20221209 p3) 11.3.1 20221209
GNU ld (Gentoo 2.38 p4) 2.38
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agoia64: Regenerate ulps
Andreas K. Hüttel [Sun, 22 Jan 2023 18:32:17 +0000 (19:32 +0100)]
ia64: Regenerate ulps

Linux guppy 5.13.0-00002-gdecb01746d6c #368 SMP Sat Aug 14 20:10:13 UTC 2021 ia64 Dual-Core Intel(R) Itanium(R) Processor 9040 GenuineIntel GNU/Linux
gcc (Gentoo 12.2.1_p20221231 p8) 12.2.1 20221231
GNU ld (Gentoo 2.40 p1) 2.40
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agoUpdate libc.pot for 2.37 release.
Carlos O'Donell [Mon, 23 Jan 2023 13:49:29 +0000 (08:49 -0500)]
Update libc.pot for 2.37 release.

16 months agox86: Cache computation for AMD architecture.
Sajan Karumanchi [Wed, 18 Jan 2023 17:29:04 +0000 (18:29 +0100)]
x86: Cache computation for AMD architecture.

All AMD architectures cache details will be computed based on
__cpuid__ `0x8000_001D` and the reference to __cpuid__ `0x8000_0006` will be
zeroed out for future architectures.

Reviewed-by: Premachandra Mallappa <premachandra.mallappa@amd.com>
16 months agomanual: Fix typo
Martin Joerg [Wed, 18 Jan 2023 17:34:08 +0000 (18:34 +0100)]
manual: Fix typo

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
16 months agoAdd STATX_DIOALIGN from Linux 6.1 to bits/statx-generic.h
Joseph Myers [Tue, 17 Jan 2023 20:41:34 +0000 (20:41 +0000)]
Add STATX_DIOALIGN from Linux 6.1 to bits/statx-generic.h

Linux 6.1 adds a new STATX_DIOALIGN constant.  Add it to glibc's
bits/statx-generic.h.

Tested for x86_64.

16 months agoAdd IPPROTO_L2TP from Linux 6.1 to netinet/in.h
Joseph Myers [Tue, 17 Jan 2023 20:41:04 +0000 (20:41 +0000)]
Add IPPROTO_L2TP from Linux 6.1 to netinet/in.h

Linux 6.1 adds a define IPPROTO_L2TP to its include/uapi/linux/in.h
(not strictly a new constant, since it's moved from
include/uapi/linux/l2tp.h).  Add this constant to glibc's
netinet/in.h.

Tested for x86_64.

16 months agoAArch64: Improve strrchr
Wilco Dijkstra [Wed, 11 Jan 2023 13:53:19 +0000 (13:53 +0000)]
AArch64: Improve strrchr

Use shrn for narrowing the mask which simplifies code and speeds up small
strings.  Unroll the first search loop to improve performance on large
strings.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Optimize strnlen
Wilco Dijkstra [Wed, 11 Jan 2023 13:53:05 +0000 (13:53 +0000)]
AArch64: Optimize strnlen

Optimize strnlen using the shrn instruction and improve the main loop.
Small strings are around 10% faster, large strings are 40% faster on
modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Optimize strlen
Wilco Dijkstra [Wed, 11 Jan 2023 13:52:53 +0000 (13:52 +0000)]
AArch64: Optimize strlen

Optimize strlen by unrolling the main loop.  Large strings are 64% faster on
modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Optimize strcpy
Wilco Dijkstra [Wed, 11 Jan 2023 13:52:39 +0000 (13:52 +0000)]
AArch64: Optimize strcpy

Unroll the main loop.  Large strings are around 20% faster on modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Improve strchrnul
Wilco Dijkstra [Wed, 11 Jan 2023 13:52:23 +0000 (13:52 +0000)]
AArch64: Improve strchrnul

Unroll the main loop, which improves performance slightly.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Optimize strchr
Wilco Dijkstra [Wed, 11 Jan 2023 13:52:08 +0000 (13:52 +0000)]
AArch64: Optimize strchr

Simplify calculation of the mask using shrn.  Unroll the main loop.
Small strings are 20% faster on modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Improve strlen_asimd
Wilco Dijkstra [Wed, 11 Jan 2023 13:51:48 +0000 (13:51 +0000)]
AArch64: Improve strlen_asimd

Use shrn for the mask, merge tst+bne into cbnz, and tweak code alignment.
Performance improves slightly as a result.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Optimize memrchr
Wilco Dijkstra [Wed, 11 Jan 2023 13:51:17 +0000 (13:51 +0000)]
AArch64: Optimize memrchr

Optimize the main loop - large strings are 43% faster on modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agoAArch64: Optimize memchr
Wilco Dijkstra [Wed, 11 Jan 2023 13:50:59 +0000 (13:50 +0000)]
AArch64: Optimize memchr

Optimize the main loop - large strings are 40% faster on modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
16 months agohurd: Fix _NOFLSH value
Samuel Thibault [Sun, 15 Jan 2023 19:54:42 +0000 (20:54 +0100)]
hurd: Fix _NOFLSH value

shifting 1 (thus an integer) left 31 bit is undefined behavior. We have to
make it an unsigned integer to properly get 0x80000000 (like done in other
places).

16 months agoelf: Fix GL(dl_phdr) and GL(dl_phnum) for static builds [BZ #29864]
Adhemerval Zanella [Tue, 3 Jan 2023 12:56:28 +0000 (09:56 -0300)]
elf: Fix GL(dl_phdr) and GL(dl_phnum) for static builds [BZ #29864]

The 73fc4e28b9464f0e refactor did not add the GL(dl_phdr) and
GL(dl_phnum) for static build, relying on the __ehdr_start symbol,
which is always added by the static linker, to get the correct values.

This is problematic in some ways:

  - The segment may see its in-memory size differ from its in-file
    size (or the binary may have holes).  The Linux has fixed is to
    provide concise values for both AT_PHDR and AT_PHNUM (commit
    0da1d5002745c - "fs/binfmt_elf: Fix AT_PHDR for unusual ELF files")

  - Some archs (alpha for instance) the hidden weak reference is not
    correctly pulled by the static linker and  __ehdr_start address
    end up being 0, which makes GL(dl_phdr) and GL(dl_phnum) have both
    invalid values (and triggering a segfault later on libc.so while
    accessing TLS variables).

The safer fix is to just restore the previous behavior to setup
GL(dl_phdr) and GL(dl_phnum) for static based on kernel auxv.  The
__ehdr_start fallback can also be simplified by not assuming weak
linkage (as for PIE).

The libc-static.c auxv init logic is moved to dl-support.c, since
the later is build without SHARED and then GLRO macro is defined
to access the variables directly.

The _dl_phdr is also assumed to be always non NULL, since an invalid
NULL values does not trigger TLS initialization (which is used in
various libc systems).

Checked on aarch64-linux-gnu, x86_64-linux-gnu, and i686-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
16 months agostring: Suppress -Wmaybe-unitialized for wordcopy [BZ #19444]
Adhemerval Zanella [Wed, 11 Jan 2023 21:27:29 +0000 (18:27 -0300)]
string: Suppress -Wmaybe-unitialized for wordcopy [BZ #19444]

When compiling with GCC 6+ the sparc build warns that some variables
might be used uninitialized.  However it does not seem the fact, since
the variables are really initialized (and also other targets that use the
same code, like powerpc, do not warn about it).

So suppress the warning for now.

Changes from v1:
* Update patch description and the explanation for the suppresion.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agoscripts/build-many-glibcs.py: Remove unused RANLIB and STRIP option
Adhemerval Zanella [Wed, 11 Jan 2023 21:17:11 +0000 (18:17 -0300)]
scripts/build-many-glibcs.py: Remove unused RANLIB and STRIP option

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agoconfigure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILS
Adhemerval Zanella [Wed, 11 Jan 2023 21:17:10 +0000 (18:17 -0300)]
configure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILS

Allow the variables to be overriden or have the defaults come
from the compiler currently in use.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agoconfigure: Allow user override LD, AR, OBJCOPY, and GPROF
Adhemerval Zanella [Tue, 6 Dec 2022 16:02:41 +0000 (13:02 -0300)]
configure: Allow user override LD, AR, OBJCOPY, and GPROF

The only way to override LD, AR, OBJCOPY, and GPROF is through
--with-binutils (setting the environments variables on configure is
overridden by LIBC_PROG_BINUTILS).

The build-many-glibcs.py (bmg) glibcs option generates a working config,
but not fully concise (some tools will be set from environment variable,
while other will be set from $CC --print-prog-name).  So remove the
environment variable set to always use the "$CC --print-prog-name".
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agomath: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444]
Adhemerval Zanella [Thu, 29 Dec 2022 12:58:02 +0000 (09:58 -0300)]
math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444]

The patch suppress the same warnings from 87c266d758d29e52bfb717f90,
that shows issues for microblaze, mips soft-fp, nios2, and or1k.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agosunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444]
Adhemerval Zanella [Thu, 29 Dec 2022 12:58:00 +0000 (09:58 -0300)]
sunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444]

The same issue described by 6128e82ebe973163d2dd614d31753c88c0c4d645
also happend with -O1.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agolocale: Use correct buffer size for utf8_sequence_error [BZ #19444]
Adhemerval Zanella [Thu, 29 Dec 2022 12:57:59 +0000 (09:57 -0300)]
locale: Use correct buffer size for utf8_sequence_error [BZ #19444]

The buffer used by snprintf might not be large enough for all possible
inputs, as indicated by gcc with -O1:

../locale/programs/linereader.c: In function ‘utf8_sequence_error’:
../locale/programs/linereader.c:713:58: error: ‘%02x’ directive output
may be truncated writing between 2 and 8 bytes into a region of size
between 1 and 13 [-Werror=format-truncation=]
  713 |     snprintf (buf, sizeof (buf), "0x%02x 0x%02x 0x%02x 0x%02x",
      |                                                          ^~~~
../locale/programs/linereader.c:713:34: note: directive argument in the
range [0, 2147483647]
  713 |     snprintf (buf, sizeof (buf), "0x%02x 0x%02x 0x%02x 0x%02x",
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../locale/programs/linereader.c:713:5: note: ‘snprintf’ output between
20 and 38 bytes into a destination of size 30
  713 |     snprintf (buf, sizeof (buf), "0x%02x 0x%02x 0x%02x 0x%02x",
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  714 |               ch1, ch2, ch3, ch4);
      |               ~~~~~~~~~~~~~~~~~~~

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
16 months agoAdd HWCAP2_SVE_EBF16 from Linux 6.1 to AArch64 bits/hwcap.h
Joseph Myers [Tue, 10 Jan 2023 15:51:58 +0000 (15:51 +0000)]
Add HWCAP2_SVE_EBF16 from Linux 6.1 to AArch64 bits/hwcap.h

Linux 6.1 adds a new AArch64 HWCAP2 value HWCAP2_SVE_EBF16; add it to
the corresponding bits/hwcap.h.

Tested with build-many-glibcs.py for aarch64.

16 months agoAdd _FORTIFY_SOURCE implementation documentation [BZ #28998]
Siddhesh Poyarekar [Tue, 10 Jan 2023 15:22:38 +0000 (10:22 -0500)]
Add _FORTIFY_SOURCE implementation documentation [BZ #28998]

There have been multiple requests to provide more detail on how the
_FORTIFY_SOURCE macro works, so this patch adds a new node in the
Library Maintenance section that does this.  A lot of the description is
implementation detail, which is why I put this in the appendix and not
in the main documentation.

Resolves: BZ #28998.
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
17 months agoUpdate copyright dates not handled by scripts/update-copyrights
Joseph Myers [Fri, 6 Jan 2023 21:45:36 +0000 (21:45 +0000)]
Update copyright dates not handled by scripts/update-copyrights

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

17 months agoUpdate copyright dates with scripts/update-copyrights
Joseph Myers [Fri, 6 Jan 2023 21:08:04 +0000 (21:08 +0000)]
Update copyright dates with scripts/update-copyrights

17 months agoRemove trailing whitespace in gmp.h
Joseph Myers [Fri, 6 Jan 2023 21:14:15 +0000 (21:14 +0000)]
Remove trailing whitespace in gmp.h

17 months agoRemove trailing whitespace
Joseph Myers [Fri, 6 Jan 2023 21:11:08 +0000 (21:11 +0000)]
Remove trailing whitespace

For some reason this causes a pre-commit check error for a copyright
date update commit, even though that commit doesn't touch anything
near the line with this whitespace.

17 months agoC2x semantics for <tgmath.h>
Joseph Myers [Fri, 6 Jan 2023 19:33:29 +0000 (19:33 +0000)]
C2x semantics for <tgmath.h>

<tgmath.h> implements semantics for integer generic arguments that
handle cases involving _FloatN / _FloatNx types as specified in TS
18661-3 plus some defect fixes.

C2x has further changes to the semantics for <tgmath.h> macros with
such types, which should also be considered defect fixes (although
handled through the integration of TS 18661-3 in C2x rather than
through an issue tracking process).  Specifically, the rules were
changed because of problems raised with using the macros with the
evaluation format types such as float_t and _Float32_t: the older
version of the rules didn't allow passing _FloatN / _FloatNx types to
the narrowing macros returning float or double, or passing float /
double / long double to the narrowing macros returning _FloatN /
_FloatNx, which was a problem with the evaluation format types which
could be either kind of type depending on the value of
FLT_EVAL_METHOD.

Thus the new rules allow cases of mixing types which were not allowed
before, and, as part of the changes, the handling of integer arguments
was also changed: if there is any _FloatNx generic argument, integer
generic arguments are treated as _Float32x (not double), while the
rule about treating integer arguments to narrowing macros returning
_FloatN or _FloatNx as _Float64 not double was removed (no longer
needed now double is a valid argument to such macros).

I've implemented the changes in GCC's __builtin_tgmath, which thus
requires updates to glibc's test expectations so that the tests
continue to build with GCC 13 (the test is also updated to test the
argument types that weren't allowed before but are now valid under C2x
rules).

Given those test changes, it's then also necessary to fix the
implementations in <tgmath.h> to have appropriate semantics with older
GCC so that the tests pass with GCC versions before GCC 13 as well.
For some cases (non-narrowing macros with two or three generic
arguments; narrowing macros returning _Float32x), the older version of
__builtin_tgmath doesn't correspond sufficiently well to C2x
semantics, so in those cases <tgmath.h> is adjusted to use the older
macro implementation instead of __builtin_tgmath.  The older macro
implementation is itself adjusted to give the desired semantics, with
GCC 7 and later.  (It's not possible to get the right semantics in all
cases for the narrowing macros with GCC 6 and before when the _FloatN
/ _FloatNx names are typedefs rather than distinct types.)

Tested as follows: with the full glibc testsuite for x86_64, GCC 6, 7,
11, 13; with execution of the math/tests for aarch64, arm, powerpc and
powerpc64le, GCC 6, 7, 12 and 13 (powerpc64le only with GCC 12 and
13); with build-many-glibcs.py with GCC 6, 7, 12 and 13.

17 months agotime: Set daylight to 1 for matching DST/offset change (bug 29951)
Florian Weimer [Thu, 5 Jan 2023 17:21:25 +0000 (18:21 +0100)]
time: Set daylight to 1 for matching DST/offset change (bug 29951)

The daylight variable is supposed to be set to 1 if DST is ever in
use for the current time zone.  But __tzfile_read used to do this:

  __daylight = rule_stdoff != rule_dstoff;

This check can fail to set __daylight to 1 if the DST and non-DST
offsets happen to be the same.

17 months agoFix ldbl-128 built-in function use
Joseph Myers [Thu, 5 Jan 2023 00:02:54 +0000 (00:02 +0000)]
Fix ldbl-128 built-in function use

Fix the following issues with built-in function use in
sysdeps/ieee754/ldbl-128 and sysdeps/ieee754/float128:

* fabsl used __builtin_fabsf128 unconditionally, breaking the build
  with GCC 6 for several architectures; it should use __builtin_fabsl
  with an appropriate redirection in float128_private.h.  (I'm not
  particularly concerned with building glibc with GCC 6; rather, I
  want to be able to run the tgmath.h tests with GCC 6, which is a
  significantly different case for tgmath.h compared to GCC 7 and
  later because of the lack of _FloatN / _FloatNx support in the
  compiler, and at present running the tests with a compiler means
  building glibc with that compiler.)

* Some (conditional) uses of built-in functions had been added to
  ldbl-128 without appropriate float128_private.h remapping (there was
  remapping for the macros controlling whether the built-in functions
  are used, just not for the functions themselves).

* s_llrintl.c called __builtin_round not __builtin_llrintl, which is
  obviously wrong.

Tested with build-many-glibcs.py for aarch64-linux-gnu, GCC 6 (where
it fixes the glibc build) and GCC 12, and with the glibc testsuite for
x86_64.

17 months agox86: Check minimum/maximum of non_temporal_threshold [BZ #29953]
H.J. Lu [Tue, 3 Jan 2023 21:06:48 +0000 (13:06 -0800)]
x86: Check minimum/maximum of non_temporal_threshold [BZ #29953]

The minimum non_temporal_threshold is 0x4040.  non_temporal_threshold may
be set to less than the minimum value when the shared cache size isn't
available (e.g., in an emulator) or by the tunable.  Add checks for
minimum and maximum of non_temporal_threshold.

This fixes BZ #29953.

17 months agoi686: Regenerate ulps
Andreas K. Hüttel [Mon, 2 Jan 2023 17:35:59 +0000 (18:35 +0100)]
i686: Regenerate ulps

Reviewed-by: Florian Weimer <fweimer@redhat.com>
17 months agohurd getcwd: Fix memory leak on error
Samuel Thibault [Mon, 2 Jan 2023 00:59:53 +0000 (01:59 +0100)]
hurd getcwd: Fix memory leak on error

17 months agohurd fcntl: Make LOCKED macro more robust
Samuel Thibault [Mon, 2 Jan 2023 00:54:18 +0000 (01:54 +0100)]
hurd fcntl: Make LOCKED macro more robust

17 months agohurd: Make dl-sysdep __sbrk check __vm_allocate call
Samuel Thibault [Mon, 2 Jan 2023 00:49:59 +0000 (01:49 +0100)]
hurd: Make dl-sysdep __sbrk check __vm_allocate call

The caller won't be able to progress, but better crash than use random
addr.

17 months agohtl: Drop duplicate check in __pthread_stack_alloc
Samuel Thibault [Mon, 2 Jan 2023 00:47:38 +0000 (01:47 +0100)]
htl: Drop duplicate check in __pthread_stack_alloc

17 months agohurd hurdstartup: Initialize remaining fields of hurd_startup_data
Samuel Thibault [Mon, 2 Jan 2023 00:36:02 +0000 (01:36 +0100)]
hurd hurdstartup: Initialize remaining fields of hurd_startup_data

In case we don't have a bootstrap port or __exec_startup_get_info
failed, we should avoid leaking uninitialized fields of data.