Skip to content

Commit ee73354

Browse files
committed
spec: bump glibc to 2.42, libxcrypt to 4.5.2
1 parent 295d301 commit ee73354

14 files changed

+99
-58
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
From 5bdcac84f59f8f93e5bf177b281bb1179a5bbd74 Mon Sep 17 00:00:00 2001
2+
From: Davide Cavalca <[email protected]>
3+
Date: Thu, 31 Jul 2025 17:32:58 +0200
4+
Subject: [PATCH 01/12] BACKPORT: UPSTREAM: stdlib: resolve a double lock init
5+
issue after fork [BZ #32994]
6+
7+
The __abort_fork_reset_child (introduced in
8+
d40ac01cbbc66e6d9dbd8e3485605c63b2178251) call resets the lock after the
9+
fork. This causes a DRD regression in valgrind
10+
(https://bugs.kde.org/show_bug.cgi?id=503668), as it's effectively a
11+
double initialization, despite it being actually ok in this case. As
12+
suggested in https://sourceware.org/bugzilla/show_bug.cgi?id=32994#c2
13+
we replace it here with a memcpy of another initialized lock instead,
14+
which makes valgrind happy.
15+
16+
Reviewed-by: Florian Weimer <[email protected]>
17+
(cherry picked from commit d9a348d0927c7a1aec5caf3df3fcd36956b3eb23)
18+
19+
[Mingcong Bai: Resolved a minor merge conflict in NEWS.]
20+
21+
Signed-off-by: Mingcong Bai <[email protected]>
22+
---
23+
stdlib/abort.c | 6 +++++-
24+
1 file changed, 5 insertions(+), 1 deletion(-)
25+
26+
diff --git a/stdlib/abort.c b/stdlib/abort.c
27+
index caa9e6dc04..904244a2fb 100644
28+
--- a/stdlib/abort.c
29+
+++ b/stdlib/abort.c
30+
@@ -19,6 +19,7 @@
31+
#include <internal-signals.h>
32+
#include <libc-lock.h>
33+
#include <pthreadP.h>
34+
+#include <string.h>
35+
#include <unistd.h>
36+
37+
/* Try to get a machine dependent instruction which will make the
38+
@@ -42,7 +43,10 @@ __libc_rwlock_define_initialized (static, lock);
39+
void
40+
__abort_fork_reset_child (void)
41+
{
42+
- __libc_rwlock_init (lock);
43+
+ /* Reinitialize lock without calling pthread_rwlock_init, to
44+
+ avoid a valgrind DRD false positive. */
45+
+ __libc_rwlock_define_initialized (, reset_lock);
46+
+ memcpy (&lock, &reset_lock, sizeof (lock));
47+
}
48+
49+
void
50+
--
51+
2.52.0
52+

autobuild/patches/glibc/0001-add-old-world-abi-compatibility.patch renamed to autobuild/patches/glibc/0002-add-old-world-abi-compatibility.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From aae27fb12aca3fd2d04b067d168921d3cbd5fdb1 Mon Sep 17 00:00:00 2001
1+
From 71a9c15c708f8c8bc58a9359c6e2d9704ebfd116 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sat, 13 Jan 2024 03:23:48 +0800
4-
Subject: [PATCH 01/11] add old world abi compatibility
4+
Subject: [PATCH 02/12] add old world abi compatibility
55

66
---
77
login/Makefile | 8 +-
@@ -44,10 +44,10 @@ index d6a9a6975e..46cbc2763e 100644
4444
include ../Rules
4545

4646
diff --git a/nptl/Versions b/nptl/Versions
47-
index 3221de89d1..a0df5497ac 100644
47+
index ef55376dd9..09c22f7290 100644
4848
--- a/nptl/Versions
4949
+++ b/nptl/Versions
50-
@@ -533,3 +533,264 @@ ld {
50+
@@ -536,3 +536,264 @@ ld {
5151
__nptl_set_robust_list_avail;
5252
}
5353
}
@@ -450,5 +450,5 @@ index 0000000000..3b57a461d1
450450
+
451451
+#include <sysdeps/unix/sysv/linux/statx_cp.c>
452452
--
453-
2.48.1
453+
2.52.0
454454

autobuild/patches/glibc/0002-add-sigset-ops.patch renamed to autobuild/patches/glibc/0003-add-sigset-ops.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 994b535602703046266f3003d6aa57116700a64b Mon Sep 17 00:00:00 2001
1+
From a686be3451f63b2f808573e4efa00f22fef28778 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sat, 13 Jan 2024 05:07:19 +0800
4-
Subject: [PATCH 02/11] add sigset ops
4+
Subject: [PATCH 03/12] add sigset ops
55

66
---
77
sysdeps/unix/sysv/linux/loongarch/Makefile | 13 +++++++++++++
@@ -350,5 +350,5 @@ index 0000000000..a49e3f4ee8
350350
+#undef sigorset
351351
+versioned_symbol(libc, __nw_sigorset, sigorset, GLIBC_2_36);
352352
--
353-
2.48.1
353+
2.52.0
354354

autobuild/patches/glibc/0003-add-signal-functions.patch renamed to autobuild/patches/glibc/0004-add-signal-functions.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 81bda818ce2e6806efdf92c695171e251882f883 Mon Sep 17 00:00:00 2001
1+
From 8c137f8fdef79f87a81b7a95405219e2a04657b4 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sat, 13 Jan 2024 06:35:35 +0800
4-
Subject: [PATCH 03/11] add signal functions
4+
Subject: [PATCH 04/12] add signal functions
55

66
---
77
sysdeps/loongarch/nptl/pthread_sigmask.c | 73 +++++++++++++++++++
@@ -254,5 +254,5 @@ index 0000000000..a95cf5daff
254254
@@ -0,0 +1 @@
255255
+#include<posix/spawnattr_setsigmask.c>
256256
--
257-
2.48.1
257+
2.52.0
258258

autobuild/patches/glibc/0004-add-sigaction-ucontext-compat.patch renamed to autobuild/patches/glibc/0005-add-sigaction-ucontext-compat.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 838f2e3c9ab2bf4430ecc39c2cd6cfd5fcc29e76 Mon Sep 17 00:00:00 2001
1+
From 3616b6b4e4c2b0cf9b0d22560ddc679927ed4f80 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sun, 14 Jan 2024 05:15:07 +0800
4-
Subject: [PATCH 04/11] add sigaction & ucontext compat
4+
Subject: [PATCH 05/12] add sigaction & ucontext compat
55

66
---
77
sysdeps/unix/sysv/linux/loongarch/Makefile | 8 +-
@@ -782,5 +782,5 @@ index 4b8a90bc2e..8767a2e56f 100644
782782
-weak_alias (__swapcontext, swapcontext)
783783
+versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_36);
784784
--
785-
2.48.1
785+
2.52.0
786786

autobuild/patches/glibc/0005-add-stubs-for-signal-related-io-funcs.patch renamed to autobuild/patches/glibc/0006-add-stubs-for-signal-related-io-funcs.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 53151f9db23418c99fd8c62d63177bf7919c7701 Mon Sep 17 00:00:00 2001
1+
From b8198dc6fe22e925fc3eb0a68676d7e23c5d6f04 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sat, 13 Jan 2024 07:38:04 +0800
4-
Subject: [PATCH 05/11] add stubs for signal related io funcs
4+
Subject: [PATCH 06/12] add stubs for signal related io funcs
55

66
---
77
sysdeps/unix/sysv/linux/loongarch/epoll_pwait.c | 1 +
@@ -79,5 +79,5 @@ index 0000000000..192980c66c
7979
@@ -0,0 +1 @@
8080
+#include<posix/spawnattr_getsigmask.c>
8181
--
82-
2.48.1
82+
2.52.0
8383

autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch renamed to autobuild/patches/glibc/0007-add-syscall-fallback-for-stat-at.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 62998a37ef657656bf19f6c5fae26d843feb007c Mon Sep 17 00:00:00 2001
1+
From 8a52fe017a736b9688a2fd8456dd807c6f6aba83 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sun, 14 Jan 2024 15:51:49 +0800
4-
Subject: [PATCH 06/11] add syscall fallback for *stat(at)?
4+
Subject: [PATCH 07/12] add syscall fallback for *stat(at)?
55

66
---
77
sysdeps/unix/sysv/linux/loongarch/fstat64.c | 5 ++
@@ -354,5 +354,5 @@ index 0000000000..c30f52e9f6
354354
+
355355
+#endif /* LIB_COMPAT */
356356
--
357-
2.48.1
357+
2.52.0
358358

autobuild/patches/glibc/0007-add-more-pthread-symbols.patch renamed to autobuild/patches/glibc/0008-add-more-pthread-symbols.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From b220a209cd83c91302b1aa02ef3a3f14512887d6 Mon Sep 17 00:00:00 2001
1+
From 37625283fdf659ccb64a98d669b70783f097a34e Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sun, 14 Jan 2024 08:41:15 +0800
4-
Subject: [PATCH 07/11] add more pthread symbols
4+
Subject: [PATCH 08/12] add more pthread symbols
55

66
---
77
nptl/old_pthread_cond_destroy.c | 4 ++--
@@ -195,10 +195,10 @@ index d3285b10e5..a4bc15115c 100644
195195
+versioned_symbol (libpthread, __pthread_cond_init,
196196
pthread_cond_init, GLIBC_2_3_2);
197197
diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
198-
index f915873f8c..e42ec786fe 100644
198+
index c6461bd116..7bf37275ca 100644
199199
--- a/nptl/pthread_cond_wait.c
200200
+++ b/nptl/pthread_cond_wait.c
201-
@@ -458,7 +458,7 @@ ___pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
201+
@@ -453,7 +453,7 @@ ___pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
202202
return __pthread_cond_wait_common (cond, mutex, 0, NULL);
203203
}
204204

@@ -207,7 +207,7 @@ index f915873f8c..e42ec786fe 100644
207207
GLIBC_2_3_2);
208208
libc_hidden_ver (___pthread_cond_wait, __pthread_cond_wait)
209209
#ifndef SHARED
210-
@@ -498,7 +498,7 @@ ___pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
210+
@@ -493,7 +493,7 @@ ___pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
211211
return __pthread_cond_timedwait64 (cond, mutex, &ts64);
212212
}
213213
#endif /* __TIMESIZE == 64 */
@@ -260,7 +260,7 @@ index 0828185fbd..0daf039ed4 100644
260260
GLIBC_2_3_3);
261261
#endif
262262
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
263-
index e98e2df152..7771542490 100644
263+
index 43dd16d59c..e74798dbb3 100644
264264
--- a/nptl/pthread_getattr_np.c
265265
+++ b/nptl/pthread_getattr_np.c
266266
@@ -205,10 +205,10 @@ __pthread_getattr_np (pthread_t thread_id, pthread_attr_t *attr)
@@ -463,5 +463,5 @@ index 1d447ea4b8..4d1d5d0e6d 100644
463463

464464
ifeq (,$(filter $(default-abi),$(abi-variants)))
465465
--
466-
2.48.1
466+
2.52.0
467467

autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch renamed to autobuild/patches/glibc/0009-remove-clone3-for-compatibility-with-qq.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From db15a12b224d8bb994e4518d5060d5e8fef85554 Mon Sep 17 00:00:00 2001
1+
From ec8d7d9e099adc2bb22079da31e6d56797faa399 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sun, 14 Jan 2024 16:51:44 +0800
4-
Subject: [PATCH 08/11] remove clone3 for compatibility with qq
4+
Subject: [PATCH 09/12] remove clone3 for compatibility with qq
55

66
---
77
sysdeps/unix/sysv/linux/loongarch/clone-internal.c | 8 ++++++++
@@ -23,5 +23,5 @@ index 0000000000..e01ce980bc
2323
+
2424
+#include <sysdeps/unix/sysv/linux/clone-internal.c>
2525
--
26-
2.48.1
26+
2.52.0
2727

autobuild/patches/glibc/0009-prepend-trusted-dirs.patch renamed to autobuild/patches/glibc/0010-prepend-trusted-dirs.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e9d5f443ec95c402fab2ab6a0fe0fe5ff1838165 Mon Sep 17 00:00:00 2001
1+
From 3ffdb2ede4e757c237ba94815ade75bd3e22ebf4 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <[email protected]>
33
Date: Sun, 14 Jan 2024 13:28:41 +0800
4-
Subject: [PATCH 09/11] prepend trusted-dirs
4+
Subject: [PATCH 10/12] prepend trusted-dirs
55

66
and search prepended trusted-dirs before other pathes
77
---
@@ -10,10 +10,10 @@ and search prepended trusted-dirs before other pathes
1010
2 files changed, 26 insertions(+), 3 deletions(-)
1111

1212
diff --git a/elf/Makefile b/elf/Makefile
13-
index 4b1d0d8741..dd4e270344 100644
13+
index 48aa0b57e5..90c7062251 100644
1414
--- a/elf/Makefile
1515
+++ b/elf/Makefile
16-
@@ -1523,9 +1523,10 @@ endif
16+
@@ -1563,9 +1563,10 @@ endif
1717
$(objpfx)trusted-dirs.h: $(objpfx)trusted-dirs.st; @:
1818
$(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig
1919
$(make-target-directory)
@@ -26,7 +26,7 @@ index 4b1d0d8741..dd4e270344 100644
2626
touch $@
2727
CPPFLAGS-dl-load.c += -I$(objpfx). -I$(csu-objpfx).
2828
diff --git a/elf/dl-load.c b/elf/dl-load.c
29-
index f905578a65..fabd574a18 100644
29+
index 00b9da9ec7..05db6ab86a 100644
3030
--- a/elf/dl-load.c
3131
+++ b/elf/dl-load.c
3232
@@ -113,6 +113,9 @@ static const size_t system_dirs_len[] =
@@ -66,7 +66,7 @@ index f905578a65..fabd574a18 100644
6666
*aelem++ = pelem;
6767

6868
pelem->what = "system search path";
69-
@@ -1972,9 +1981,22 @@ _dl_map_object (struct link_map *loader, const char *name,
69+
@@ -1972,9 +1981,22 @@ _dl_map_new_object (struct link_map *loader, const char *name,
7070

7171
fd = -1;
7272

@@ -91,5 +91,5 @@ index f905578a65..fabd574a18 100644
9191
/* This is the executable's map (if there is one). Make sure that
9292
we do not look at it twice. */
9393
--
94-
2.48.1
94+
2.52.0
9595

0 commit comments

Comments
 (0)